Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->BSD相关 ->正文

教你自动下载文件并制作OpenBSD ISO

来源: 作者: 时间:2007-04-11 点击: [收藏] [投稿]

done

}

# Fetch OpenBSD's installation file sets, like base39.tgz, comp39.tgz.

FETCH_SETS()

{

TMP_OB_FILES_SETS="/tmp/ob_file_sets"

# If you want to specify which file sets will be contained in the iso file,

# you should comment the following 2 lines, and create '/tmp/ob_file_sets'

# manually, and then write the file sets' names in it. Finally, maybe you

# want to comment the line following: 'rm -f $TMP_OB_FILES_SETS'.

# ------------------------------------------------------------------------

echo "Downloading OpenBSD file sets' index file..."

$FETCH_CMD -O $TMP_OB_FILES_SETS $MIRROR/$VERSION/$ARCH/index.txt

# ------------------------------------------------------------------------

for i in $(cat $TMP_OB_FILES_SETS)

do

echo "Downloading file set: $i..."

$FETCH_CMD -c -O $SETS_ARCHIVE/$i $MIRROR/$VERSION/$ARCH/$i

done

#rm -f $TMP_OB_FILES_SETS

}

FETCH_PKGS()

{

TMP_OB_PKG_SETS="/tmp/ob_pkg_sets"

# If you want to specify which packages will be contained in the iso file,

# you should comment the following 2 lines, and create '/tmp/ob_pkg_sets'

# manually, and then write the packages' name in it. Finally, maybe you

# want to comment the line following: 'rm -f $TMP_OB_PKG_SETS'.

# ------------------------------------------------------------------------

#echo "Downloading OpenBSD package sets' index file..."

#$FETCH_CMD -c -O $TMP_OB_PKG_SETS $MIRROR/$VERSION/packages/$ARCH/index.txt

# ------------------------------------------------------------------------

for i in $(cat $TMP_OB_PKG_SETS)

do

echo "Downloading package: $i..."

$FETCH_CMD -O $PKGS_ARCHIVE/$i $MIRROR/$VERSION/packages/$ARCH/$i

done

#rm -f $TMP_OB_PKG_SETS

}

# ----------- SCRIPT MAIN -------------

clear

echo -e "\n\

\t# --------------------------------------------------------------------------#

\t# ------- We recommend you buy OpenBSD's Offical CD sets to support ------#

\t# ------- ongoing development of OpenBSD. There are many good reasons ------#

\t# ------- to own an OpenBSD CD set: ------#

\t# ------- http://www.openbsd.org/faq/faq3.html#BuyCD ------#

\t# --------------------------------------------------------------------------#

\t# ------- Warnning: Not every platform supports all boot options. For ------#

\t# ------- more information, see also: ------#

\t# ------- http://www.openbsd.org/faq/faq4.html#Overview ------#

\t# --------------------------------------------------------------------------#

\t# ------- Note: If you want to include some packages in the ISO file, ------#

\t# ------- please read the function: FETCH_PKGS, and uncomment the ------#

\t# ------- function at the end of script: ------#

\t# ------- FETCH_PKGS && \ ------#

\t# --------------------------------------------------------------------------#

"

sleep 10

USAGE "$@" && \

CHECK_APPS && \

CHECK_DIRS && \

FETCH_SETS && \

#FETCH_PKGS && \

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:福布斯:Open BSD老板对Linux大肆攻击   下一篇:NetBSD的创建人之一为NetBSD未来担忧

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号