wok-4.x rev 3932
mirror-tools: fix USB key case
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Aug 20 13:10:20 2009 +0200 (2009-08-20) |
parents | 9302c4be8d07 |
children | 14480fcfd246 |
files | mirror-tools/stuff/usr/bin/mkpkgiso |
line diff
1.1 --- a/mirror-tools/stuff/usr/bin/mkpkgiso Thu Aug 20 10:57:42 2009 +0200 1.2 +++ b/mirror-tools/stuff/usr/bin/mkpkgiso Thu Aug 20 13:10:20 2009 +0200 1.3 @@ -5,7 +5,7 @@ 1.4 # Authors : Eric Joseph-Alexandre <erjo@slitaz.org> 1.5 # Pascal Bellard <pascal.bellard@slitaz.org> 1.6 1.7 -VERSION=0.5 1.8 +VERSION=0.6 1.9 1.10 ROOT=/home/slitaz/iso 1.11 SORT_DIR=${ROOT}/_iso.$$ 1.12 @@ -86,7 +86,10 @@ 1.13 # Handle --auto-install case 1.14 if [ "\$DIR" == "/etc/init.d" ]; then 1.15 DIR=/cdrom 1.16 - 1.17 + if [ ! -f /cdrom/install.sh ]; then 1.18 + mkdir /cdrom 2> /dev/null 1.19 + mount --bind /mnt /cdrom 1.20 + fi 1.21 # Handle loram on hybrid hard disk / usb key case 1.22 if [ ! -d /usr/bin ]; then 1.23 echo "" 1.24 @@ -121,7 +124,8 @@ 1.25 ls -d \$DIR/packages/* > /var/lib/tazpkg/mirror 1.26 ln -fs \$DIR/packages/*/*.tazpkg /var/cache/tazpkg/ 1.27 ln -fs \$DIR/packages/*/packages.* /var/lib/tazpkg 1.28 -echo "=> all $PKG_VER package are available for tazpkg/tazpkgbox" 1.29 +echo "" 1.30 +echo "=> all $PKG_VER packages are available for tazpkg/tazpkgbox" 1.31 EOF 1.32 [ -e files.list.lzma ] && cat >>$TEMP_DIR/install.sh<<EOF 1.33 ln -fs \$DIR/packages/*/files.list.lzma /var/lib/tazpkg 1.34 @@ -209,7 +213,7 @@ 1.35 echo "$(echo $SORT_DIR/packages/*/lighttpd-[0-9]*) -7100" >> $SORT_FILE 1.36 echo "$(echo $SORT_DIR/packages/*/pcre-[0-9]*) -7100" >> $SORT_FILE 1.37 cat >>$TEMP_DIR/install.sh<<EOF 1.38 -echo "=> slitaz web site installed in file:///\$DIR/website" 1.39 +echo "=> slitaz web site installed in file://\$DIR/website/index.html" 1.40 EOF 1.41 fi;; 1.42 esac 1.43 @@ -252,9 +256,6 @@ 1.44 case " $OPTIONS " in 1.45 *\ --auto-install\ *) 1.46 echo -n "Enable auto install" 1.47 - cat >>$TEMP_DIR/install.sh<<EOF 1.48 -echo "[ -f /\$DIR/install.sh ] || mount -o ro -t iso9660 LABEL=packages-$PKG_VER /\$DIR" >> /etc/init.d/local.sh 1.49 -EOF 1.50 sed -i "s/rw root/rw config=LABEL=packages-$PKG_VER,install.sh root/" \ 1.51 $TEMP_DIR/boot/isolinux/*.cfg 1.52 status