tazlito rev 279
tazlito: use /lib/libtaz.sh
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri May 04 18:21:22 2012 +0200 (2012-05-04) |
parents | 90227c8c456c |
children | df6381a368a2 |
files | tazlito |
line diff
1.1 --- a/tazlito Fri May 04 17:22:04 2012 +0200 1.2 +++ b/tazlito Fri May 04 18:21:22 2012 +0200 1.3 @@ -14,6 +14,8 @@ 1.4 # 1.5 VERSION=4.5 1.6 1.7 +. /lib/libtaz.sh 1.8 + 1.9 # Tazlito configuration variables to be shorter 1.10 # and to use words rather than numbers. 1.11 COMMAND=$1 1.12 @@ -29,7 +31,9 @@ 1.13 DEFAULT_MIRROR="http://mirror.slitaz.org/packages/`cat /etc/slitaz-release`/" 1.14 1.15 log=/var/log/tazlito.log 1.16 -echo "" > $log 1.17 +if check_root; then 1.18 + echo "" > $log 1.19 +fi 1.20 1.21 # Try to include config file, continue if command is gen-config or exit. 1.22 # The main config used by default is in /etc/tazlito. 1.23 @@ -104,15 +108,6 @@ 1.24 burn-iso Burn ISO image to a cdrom using Wodim.\n" 1.25 } 1.26 1.27 -# Status function. 1.28 -status() { 1.29 - if [ $? = 0 ]; then 1.30 - echo " OK" 1.31 - else 1.32 - echo " Failed" 1.33 - fi 1.34 -} 1.35 - 1.36 yesorno() 1.37 { 1.38 echo -n "$1" 1.39 @@ -207,16 +202,6 @@ 1.40 done 1.41 } 1.42 1.43 -# Check if user is root. 1.44 -check_root() 1.45 -{ 1.46 - if test $(id -u) != 0 ; then 1.47 - echo -e "\nYou must be root to run `basename $0` with this option." 1.48 - echo -e "Please type 'su' and root password to become super-user.\n" 1.49 - exit 0 1.50 - fi 1.51 -} 1.52 - 1.53 # Check for the rootfs tree. 1.54 check_rootfs() 1.55 { 1.56 @@ -246,7 +231,7 @@ 1.57 cd - > /dev/null 1.58 echo "" 1.59 echo -e "\033[1mGenerating ISO image\033[0m" 1.60 - echo "================================================================================" 1.61 + separator 1.62 echo "Generating $1" 1.63 if [ $(ls $2/boot/vmlinuz* $2/boot/bzImage | wc -l) -eq 2 ]; then 1.64 if cmp $2/boot/vmlinuz* $2/boot/bzImage > /dev/null; then 1.65 @@ -295,7 +280,7 @@ 1.66 echo -n "Creating the ISO md5sum..." 1.67 md5sum $ISO_NAME.iso > $ISO_NAME.md5 1.68 status 1.69 - echo "================================================================================" 1.70 + separator 1.71 # Some packages may want to alter final iso 1.72 genisohooks final 1.73 } 1.74 @@ -377,7 +362,7 @@ 1.75 { 1.76 # Just in case CTRL+c 1.77 rm -f $DISTRO/gen 1.78 - 1.79 + 1.80 # Some packages may want to alter rootfs 1.81 genisohooks rootfs 1.82 cd $1 1.83 @@ -440,7 +425,7 @@ 1.84 { 1.85 echo "" 1.86 echo -e "\033[1mDistro statistics\033[0m ($DISTRO)" 1.87 - echo "================================================================================" 1.88 + separator 1.89 distro_sizes 1.90 } 1.91 1.92 @@ -501,23 +486,23 @@ 1.93 elif [ -f $1/$file ]; then 1.94 [ -f $2/$file ] && 1.95 cmp $1/$file $2/$file > /dev/null 2>&1 && rm -f $2/$file 1.96 - [ -f $2/$file ] && 1.97 + [ -f $2/$file ] && 1.98 [ "$(basename $file)" == "volatile.cpio.gz" ] && 1.99 [ "$(dirname $(dirname $file))" == \ 1.100 ".$INSTALLED" ] && rm -f $2/$file 1.101 elif [ -b $1/$file ]; then 1.102 [ -b $2/$file ] && 1.103 [ "$(stat -c '%a:%u:%g:%t:%T' $1/$file)" == \ 1.104 - "$(stat -c '%a:%u:%g:%t:%T' $2/$file)" ] && 1.105 + "$(stat -c '%a:%u:%g:%t:%T' $2/$file)" ] && 1.106 rm -f $2/$file 1.107 elif [ -c $1/$file ]; then 1.108 [ -c $2/$file ] && 1.109 [ "$(stat -c '%a:%u:%g:%t:%T' $1/$file)" == \ 1.110 - "$(stat -c '%a:%u:%g:%t:%T' $2/$file)" ] && 1.111 + "$(stat -c '%a:%u:%g:%t:%T' $2/$file)" ] && 1.112 rm -f $2/$file 1.113 fi 1.114 done 1.115 - 1.116 + 1.117 # cleanup directories 1.118 ( cd $1; find -type d ) | sed '1!G;h;$!d' | while read file; do 1.119 [ -d $2/$file ] && rmdir $2/$file 2> /dev/null 1.120 @@ -583,7 +568,7 @@ 1.121 } 1.122 1.123 # Update isolinux config files for multiple rootfs 1.124 -update_bootconfig() 1.125 +update_bootconfig() 1.126 { 1.127 local files 1.128 echo -n "Updating boot config files..." 1.129 @@ -727,9 +712,9 @@ 1.130 y*|Y*|o*|O*) 1.131 # We dont want package on host cache. 1.132 echo -n "Getting and installing package: $1" 1.133 - yes y | tazpkg get-install $1 2>&1 >> $log || exit 1 1.134 + yes y | tazpkg get-install $1 2>&1 >> $log || exit 1 1.135 status ;; 1.136 - *) 1.137 + *) 1.138 return 1 ;; 1.139 esac 1.140 } 1.141 @@ -929,7 +914,7 @@ 1.142 mkdir -p /mnt/.rw 1.143 path=/mnt/. 1.144 for i in rootfs* ; do 1.145 - mv /\$i \$path\$i 1.146 + mv /\$i \$path\$i 1.147 done 1.148 fi 1.149 1.150 @@ -1152,31 +1137,31 @@ 1.151 create_iso $OUTPUT $TMP_DIR/loramiso 1.152 } 1.153 1.154 -# Remove files installed by packages 1.155 +# Remove files installed by packages 1.156 find_flavor_rootfs() 1.157 { 1.158 for i in $1/etc/tazlito/*.extract; do 1.159 [ -e $i ] || continue 1.160 chroot $1 /bin/sh ${i#$1} 1.161 done 1.162 - 1.163 - # Clean hardlinks and files patched by genisofs in /boot 1.164 + 1.165 + # Clean hardlinks and files patched by genisofs in /boot 1.166 for i in isolinux/isolinux.bin isolinux/boot.cat bzImage ; do 1.167 rm -f $1/boot/$i 1.168 done 1.169 - 1.170 + 1.171 # Clean files generated in post_install 1.172 rm -f $1/lib/modules/*/modules.* $1/etc/mtab \ 1.173 $1/dev/core $1/dev/fd $1/dev/std* 1.174 - 1.175 + 1.176 # Verify md5 1.177 cat $1$INSTALLED/*/md5sum | \ 1.178 while read md5 file; do 1.179 [ -e $1$file ] || continue 1.180 - [ "$(cat $1$file | md5sum)" == "$md5 -" ] && 1.181 + [ "$(cat $1$file | md5sum)" == "$md5 -" ] && 1.182 rm -f $1$file 1.183 done 1.184 - 1.185 + 1.186 # Check configuration files 1.187 for i in $1$INSTALLED/*/volatile.cpio.gz; do 1.188 [ -e $i ] || continue 1.189 @@ -1189,7 +1174,7 @@ 1.190 done 1.191 rm -rf /tmp/volatile$$ 1.192 done 1.193 - 1.194 + 1.195 # Remove other files blindly 1.196 for i in $1$INSTALLED/*/files.list; do 1.197 for file in $(cat $i); do 1.198 @@ -1198,14 +1183,14 @@ 1.199 [ -d $1$file ] || rm -f $1$file 1.200 done 1.201 done 1.202 - 1.203 + 1.204 # Remove tazpkg files and tmp files 1.205 rm -rf $1$INSTALLED* $1/tmp $1/var/tmp 1.206 rm -f $1$LOCALSTATE/*packages* $1$LOCALSTATE/files.list.lzma \ 1.207 $1$LOCALSTATE/mirror* $1/var/cache/*/* \ 1.208 $1/var/lock/* $1/var/log/* $1/var/run/* $1/var/run/*/* \ 1.209 $1/var/lib/* $1/var/lib/dbus/* 2> /dev/null 1.210 - 1.211 + 1.212 # Cleanup directory tree 1.213 cd $1 1.214 find * -type d | sort -r | while read dir; do 1.215 @@ -1234,7 +1219,7 @@ 1.216 if [ ! "$ADDFILES" = "" ] ; then 1.217 echo -e "Additional files : $ADDFILES" 1.218 fi 1.219 - echo "================================================================================" 1.220 + separator 1.221 echo "" 1.222 ;; 1.223 list-addfiles) 1.224 @@ -1278,7 +1263,7 @@ 1.225 empty_config_file 1.226 echo"" 1.227 echo -e "\033[1mConfiguring :\033[0m `pwd`/tazlito.conf" 1.228 - echo "================================================================================" 1.229 + separator 1.230 # ISO name. 1.231 echo -n "ISO name : " ; read answer 1.232 sed -i s#'ISO_NAME=\"\"'#"ISO_NAME=\"$answer\""# tazlito.conf 1.233 @@ -1291,7 +1276,7 @@ 1.234 # Distro path. 1.235 echo -n "Distro path : " ; read answer 1.236 sed -i s#'DISTRO=\"\"'#"DISTRO=\"$answer\""# tazlito.conf 1.237 - echo "================================================================================" 1.238 + separator 1.239 echo "Config file is ready to use." 1.240 echo "You can now extract an ISO or generate a distro." 1.241 echo "" 1.242 @@ -1337,7 +1322,7 @@ 1.243 fi 1.244 echo "" 1.245 echo -e "\033[1mTazlito extracting :\033[0m `basename $ISO_IMAGE`" 1.246 - echo "================================================================================" 1.247 + separator 1.248 # Start to mount the ISO. 1.249 echo "" 1.250 echo "Mounting ISO image..." 1.251 @@ -1378,7 +1363,7 @@ 1.252 cp -a $TMP_DIR/boot/grub $TARGET/rootcd/boot 1.253 status 1.254 fi 1.255 - 1.256 + 1.257 echo -n "Copying the rootfs..." 1.258 cp $TMP_DIR/boot/rootfs.?z $TARGET/rootcd/boot 1.259 status 1.260 @@ -1394,12 +1379,12 @@ 1.261 umount $TMP_DIR && rm -rf $TMP_DIR 1.262 cd .. 1.263 echo "" 1.264 - echo "================================================================================" 1.265 + separator 1.266 echo "Extracted : `basename $ISO_IMAGE` ($isosize)" 1.267 echo "Distro tree : `pwd`" 1.268 echo "Rootfs size : `du -sh rootfs`" 1.269 echo "Rootcd size : `du -sh rootcd`" 1.270 - echo "================================================================================" 1.271 + separator 1.272 echo "" 1.273 ;; 1.274 list-flavors) 1.275 @@ -1409,7 +1394,7 @@ 1.276 fi 1.277 echo "" 1.278 echo -e "\033[1mList of flavors\033[0m" 1.279 - echo "================================================================================" 1.280 + separator 1.281 cat /etc/tazlito/flavors.list 1.282 echo "" 1.283 ;; 1.284 @@ -1425,14 +1410,14 @@ 1.285 if [ "$3" = "--brief" ]; then 1.286 if [ "$4" != "--noheader" ]; then 1.287 echo "Name ISO Rootfs Description" 1.288 - echo "================================================================================" 1.289 + separator 1.290 fi 1.291 printf "%-16.16s %6.6s %6.6s %s\n" "$FLAVOR" \ 1.292 "$(field ISO $TMP_DIR/$FLAVOR.desc)" \ 1.293 "$(field 'Rootfs size' $TMP_DIR/$FLAVOR.desc)" \ 1.294 "$(grep ^Description $TMP_DIR/$FLAVOR.desc | cut -d: -f2)" 1.295 else 1.296 - echo "================================================================================" 1.297 + separator 1.298 cat $TMP_DIR/$FLAVOR.desc 1.299 fi 1.300 rm -Rf $TMP_DIR 1.301 @@ -1487,7 +1472,7 @@ 1.302 FLAVOR=${2%.flavor} 1.303 echo "" 1.304 echo -e "\033[1mFlavor generation\033[0m" 1.305 - echo "================================================================================" 1.306 + separator 1.307 if [ -z "$FLAVOR" ]; then 1.308 echo -n "Flavor name : " 1.309 read FLAVOR 1.310 @@ -1536,7 +1521,7 @@ 1.311 gzip -9 > $FLAVOR.flavor 1.312 rm `echo -e $FILES` 1.313 status 1.314 - echo "================================================================================" 1.315 + separator 1.316 echo "Flavor size : `du -sh $FLAVOR.flavor`" 1.317 echo "" 1.318 ;; 1.319 @@ -1758,7 +1743,7 @@ 1.320 # Get a flavor's files and prepare for gen-distro. 1.321 FLAVOR=${2%.flavor} 1.322 echo -e "\n\033[1mPreparing $FLAVOR distro flavor\033[0m" 1.323 - echo "================================================================================" 1.324 + separator 1.325 if [ -f $FLAVOR.flavor ] || download $FLAVOR.flavor; then 1.326 echo -n "Cleaning $DISTRO..." 1.327 rm -R $DISTRO 2> /dev/null 1.328 @@ -1815,10 +1800,10 @@ 1.329 gzip -9 > /etc/tazlito/info 1.330 rm -Rf $TMP_DIR 1.331 fi 1.332 - echo "================================================================================" 1.333 + separator 1.334 echo -e "Flavor is ready to be generated by: tazlito gen-distro\n" 1.335 ;; 1.336 - 1.337 + 1.338 iso2flavor) 1.339 if [ -z "$3" -o ! -s "$2" ]; then 1.340 cat <<EOT 1.341 @@ -1900,7 +1885,7 @@ 1.342 fi 1.343 rm -rf $TMP_DIR 1.344 ;; 1.345 - 1.346 + 1.347 check-list) 1.348 # Use current packages list in $PWD by default. 1.349 DISTRO_PKGS_LIST=distro-packages.list 1.350 @@ -1909,7 +1894,7 @@ 1.351 [ ! -f $DISTRO_PKGS_LIST ] && echo "No packages list found." && exit 0 1.352 echo "" 1.353 echo -e "\033[1mLiveCD packages list check\033[0m" 1.354 - echo "================================================================================" 1.355 + separator 1.356 for pkg in `cat $DISTRO_PKGS_LIST` 1.357 do 1.358 if ! grep -q "$pkg" $LOCALSTATE/packages.list; then 1.359 @@ -1918,14 +1903,14 @@ 1.360 fi 1.361 done 1.362 [ -z $up ] && echo -e "List is up-to-date\n" && exit 0 1.363 - echo "================================================================================" 1.364 + separator 1.365 echo -e "Updates: $up\n" ;; 1.366 gen-distro) 1.367 # Generate a live distro tree with a set of packages. 1.368 # 1.369 check_root 1.370 time=$(date +%s) 1.371 - 1.372 + 1.373 # Check if a package list was specified on cmdline. 1.374 LIST_NAME="distro-packages.list" 1.375 CDROM="" 1.376 @@ -1950,7 +1935,7 @@ 1.377 esac 1.378 shift 1.379 done 1.380 - 1.381 + 1.382 if [ -d $ROOTFS ] ; then 1.383 # Delete $ROOTFS if --force is set on command line 1.384 if [ ! -z $DELETE_ROOTFS ]; then 1.385 @@ -1979,7 +1964,7 @@ 1.386 # Start generation. 1.387 echo "" 1.388 echo -e "\033[1mTazlito generating a distro\033[0m" 1.389 - echo "================================================================================" 1.390 + separator 1.391 # Misc checks 1.392 [ -n "$PACKAGES_REPOSITORY" ] || PACKAGES_REPOSITORY="." 1.393 [ -d $PACKAGES_REPOSITORY ] || mkdir -p $PACKAGES_REPOSITORY 1.394 @@ -2016,7 +2001,7 @@ 1.395 fi 1.396 [ "$REPACK" = "n" -a "$DOWNLOAD" = "n" ] && exit 1 1.397 done 1.398 - 1.399 + 1.400 # Mount cdrom to be able to repack boot-loader packages 1.401 if [ ! -e /boot -a -n "$CDROM" ]; then 1.402 mkdir $TMP_MNT 1.403 @@ -2051,7 +2036,7 @@ 1.404 # Look for package in running distribution 1.405 elif [ -n "$PACKAGE" -a "$REPACK" = "y" ]; then 1.406 tazpkg repack $PACKAGE && \ 1.407 - mv $pkg.tazpkg $PACKAGES_REPOSITORY 1.408 + mv $pkg.tazpkg $PACKAGES_REPOSITORY 1.409 fi 1.410 fi 1.411 if [ ! -f $PACKAGES_REPOSITORY/$pkg.tazpkg ]; then 1.412 @@ -2080,7 +2065,7 @@ 1.413 pkg=$(ls $pkg*.tazpkg) 1.414 grep -q "^$pkg$" $LIST_NAME || \ 1.415 echo $pkg >>$LIST_NAME 1.416 - mv $pkg $PACKAGES_REPOSITORY 1.417 + mv $pkg $PACKAGES_REPOSITORY 1.418 done 1.419 fi 1.420 cp $LIST_NAME $DISTRO/distro-packages.list 1.421 @@ -2089,7 +2074,7 @@ 1.422 for pkg in $(cat $DISTRO/list-packages) 1.423 do 1.424 echo -n "Installing package: $pkg" 1.425 - yes y | tazpkg install $pkg --root=$ROOTFS 2>&1 >> $log || exit 1 1.426 + yes y | tazpkg install $pkg --root=$ROOTFS 2>&1 >> $log || exit 1 1.427 status 1.428 done 1.429 rm -f $ROOTFS/var/lib/tazpkg/packages.* 1.430 @@ -2192,8 +2177,8 @@ 1.431 # 1.432 check_root 1.433 echo "" 1.434 - echo -e "\033[1mCleaning :\033[0m $DISTRO" 1.435 - echo "================================================================================" 1.436 + boldify "Cleaning : $DISTRO" 1.437 + separator 1.438 if [ -d "$DISTRO" ] ; then 1.439 if [ -d "$ROOTFS" ] ; then 1.440 echo -n "Removing the rootfs..." 1.441 @@ -2211,16 +2196,15 @@ 1.442 rm -f $DISTRO/$ISO_NAME.md5 1.443 status 1.444 fi 1.445 - echo "================================================================================" 1.446 - echo "" 1.447 - ;; 1.448 + separator 1.449 + echo "" ;; 1.450 check-distro) 1.451 # Check for a few LiveCD needed files not installed by packages. 1.452 # 1.453 check_rootfs 1.454 echo "" 1.455 echo -e "\033[1mChecking distro :\033[0m $ROOTFS" 1.456 - echo "================================================================================" 1.457 + separator 1.458 # SliTaz release info. 1.459 if [ ! -f "$ROOTFS/etc/slitaz-release" ]; then 1.460 echo "Missing release info : /etc/slitaz-release" 1.461 @@ -2237,7 +2221,7 @@ 1.462 echo -n "Mirror configuration exists..." 1.463 status 1.464 fi 1.465 - # Isolinux msg 1.466 + # Isolinux msg 1.467 if grep -q "cooking-XXXXXXXX" /$ROOTCD/boot/isolinux/isolinux.*g; then 1.468 echo -n "Isolinux msg : Missing cooking date XXXXXXXX (ex `date +%Y%m%d`)" 1.469 todomsg 1.470 @@ -2245,12 +2229,12 @@ 1.471 echo -n "Isolinux message seems good..." 1.472 status 1.473 fi 1.474 - echo "================================================================================" 1.475 + separator 1.476 echo "" 1.477 ;; 1.478 writeiso) 1.479 # Writefs to ISO image including /home unlike gen-distro we dont use 1.480 - # packages to generate a rootfs, we build a compressed rootfs with all 1.481 + # packages to generate a rootfs, we build a compressed rootfs with all 1.482 # the current filesystem similar to 'tazusb writefs'. 1.483 # 1.484 DISTRO="/home/slitaz/distro" 1.485 @@ -2270,12 +2254,12 @@ 1.486 echo "" 1.487 echo -e "\033[1mWrite filesystem to ISO\033[0m 1.488 =============================================================================== 1.489 -The command writeiso will write the current filesystem into a suitable cpio 1.490 -archive (rootfs.gz) and generate a bootable ISO image (slitaz.iso). 1.491 +The command writeiso will write the current filesystem into a suitable cpio 1.492 +archive (rootfs.gz) and generate a bootable ISO image (slitaz.iso). 1.493 1.494 Archive compression: $COMPRESSION" 1.495 echo "" 1.496 - 1.497 + 1.498 # Save some space 1.499 rm /var/cache/tazpkg/* -r -f 1.500 rm -rf /home/slitaz/distro 1.501 @@ -2291,13 +2275,13 @@ 1.502 echo -n "Removing current sound card and screen configurations..." 1.503 rm -f /var/lib/sound-card-driver 1.504 rm -f /etc/asound.state 1.505 - rm -f /etc/X11/screen.conf 1.506 + rm -f /etc/X11/screen.conf 1.507 rm -f /etc/X11/xorg.conf ;; 1.508 *) 1.509 echo -n "Keeping current sound card and screen configurations..." ;; 1.510 esac 1.511 status 1.512 - 1.513 + 1.514 cd / 1.515 # Create list of files including default user files since it is defined in /etc/passwd 1.516 # and some new users might have been added. 1.517 @@ -2325,7 +2309,7 @@ 1.518 # Move freshly generated rootfs to the cdrom. 1.519 mkdir -p $ROOTCD/boot 1.520 mv -f /rootfs.gz $ROOTCD/boot 1.521 - 1.522 + 1.523 # Now we need the kernel and isolinux files. 1.524 if mount /dev/cdrom /media/cdrom 2>/dev/null; then 1.525 cp /media/cdrom/boot/bzImage $ROOTCD/boot 1.526 @@ -2339,13 +2323,13 @@ 1.527 umount /media/cdrom; 1.528 else 1.529 echo -e " 1.530 -When SliTaz is running in RAM the kernel and bootloader files are kept 1.531 -on the cdrom. Please insert a LiveCD or loop mount the slitaz.iso to 1.532 +When SliTaz is running in RAM the kernel and bootloader files are kept 1.533 +on the cdrom. Please insert a LiveCD or loop mount the slitaz.iso to 1.534 /media/cdrom to let Tazlito copy the files.\n" 1.535 echo -en "----\nENTER to continue..."; read i 1.536 exit 1 1.537 fi 1.538 - 1.539 + 1.540 # Generate the iso image. 1.541 cd $DISTRO 1.542 echo "Generating ISO image..." 1.543 @@ -2393,19 +2377,19 @@ 1.544 fi 1.545 echo "" 1.546 echo -e "\033[1mTazlito burn ISO\033[0m " 1.547 - echo "================================================================================" 1.548 + separator 1.549 echo "Cdrom device : /dev/$DRIVE_NAME" 1.550 echo "Drive speed : $DRIVE_SPEED" 1.551 echo "ISO image : $iso" 1.552 - echo "================================================================================" 1.553 + separator 1.554 echo "" 1.555 yesorno "Burn ISO image (y/N) ? " 1.556 if [ "$answer" == "y" ]; then 1.557 echo "" 1.558 echo "Starting Wodim to burn the iso..." && sleep 2 1.559 - echo "================================================================================" 1.560 + separator 1.561 wodim speed=$DRIVE_SPEED dev=/dev/$DRIVE_NAME $iso 1.562 - echo "================================================================================" 1.563 + separator 1.564 echo "ISO image is burned to cdrom." 1.565 else 1.566 echo -e "\nExiting. No ISO burned." 1.567 @@ -2424,7 +2408,7 @@ 1.568 rootfs1 is found in iso, sizeN is the RAM size need to launch rootfsN. 1.569 The boot loader will select the rootfs according to the RAM size detected. 1.570 1.571 -Example: 1.572 +Example: 1.573 $ tazlito merge 160M slitaz-core.iso 96M rootfs-justx.gz 32M rootfs-base.gz 1.574 1.575 Will start slitaz-core with 160M+ RAM, slitaz-justX with 96M-160M RAM, 1.576 @@ -2465,7 +2449,7 @@ 1.577 cp /boot/isolinux/c32box.c32 $TMP_DIR/iso/boot/isolinux 2> /dev/null || 1.578 cp /boot/isolinux/ifmem.c32 $TMP_DIR/iso/boot/isolinux 1.579 fi 1.580 - 1.581 + 1.582 echo -n "Extracting iso/rootfs.gz" 1.583 extract_rootfs $TMP_DIR/iso/boot/rootfs.gz $TMP_DIR/rootfs1 && 1.584 [ -d $TMP_DIR/rootfs1/etc ] 1.585 @@ -2509,7 +2493,7 @@ 1.586 status || cleanup_merge 1.587 cp -a $TMP_DIR/mnt $TMP_DIR/iso 1.588 umount -d $TMP_DIR/mnt 1.589 - 1.590 + 1.591 for i in $TMP_DIR/iso/boot/rootfs* ; do 1.592 echo -n "Repacking $(basename $i)" 1.593 (zcat $i 2> /dev/null || unlzma -c $i || cat $i) \ 1.594 @@ -2518,7 +2502,7 @@ 1.595 $(lzma_switches $TMP_DIR/rootfs) 1.596 status 1.597 done 1.598 - 1.599 + 1.600 create_iso $ISO $TMP_DIR/iso 1.601 rm -rf $TMP_DIR ;; 1.602 1.603 @@ -2550,7 +2534,7 @@ 1.604 umount -d $TMP_DIR/iso 1.605 rm -rf $TMP_DIR ;; 1.606 1.607 - 1.608 + 1.609 frugal-install|-fi) 1.610 ISO_IMAGE="$2" 1.611 echo "" 1.612 @@ -2596,7 +2580,7 @@ 1.613 fi 1.614 status 1.615 echo "" ;; 1.616 - 1.617 + 1.618 emu-iso) 1.619 # Emulate an ISO image with Qemu. 1.620 if [ -n "$2" ] ; then