tazusb rev 104
tazusb: keep multi-in-one flavor
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 20 13:40:49 2012 +0100 (2012-02-20) |
parents | fc8df54f6276 |
children | fb9ada45adea |
files | tazusb |
line diff
1.1 --- a/tazusb Mon Feb 20 01:34:42 2012 +0100 1.2 +++ b/tazusb Mon Feb 20 13:40:49 2012 +0100 1.3 @@ -283,14 +283,6 @@ 1.4 mkdir -p $TARGET_ROOT/boot 1.5 cp /media/cdrom/boot/bzImage $TARGET_ROOT/boot 1.6 cp /media/cdrom/boot/rootfs*.gz $TARGET_ROOT/boot 1.7 - #rem=0 1.8 - #~ for i in $(ls /media/cdrom/boot/rootfs*.gz | sort -r); do 1.9 - #~ [ $rem -ne 0 ] && 1.10 - #~ dd if=/dev/zero bs=1 count=$((4 - $rem)) 2> /dev/null 1.11 - #~ cat $i 1.12 - #~ rem=$(stat -c %s $i) 1.13 - #~ rem=$(($rem % 4)) 1.14 - #~ done > $TARGET_ROOT/boot/rootfs.gz 1.15 status 1.16 } 1.17 1.18 @@ -337,44 +329,20 @@ 1.19 sed -i -e "s/\(append.*\)/\1 home=$UUID/" $(grep -l append $TARGET_ROOT/boot/$ST/*) 1.20 1.21 # Splash screen and help files. 1.22 - if [ -f /media/cdrom/boot/isolinux/isolinux.msg ]; then 1.23 - cp /media/cdrom/boot/isolinux/isolinux.msg $TARGET_ROOT/boot/$ST/$ST.msg 1.24 - sed -i s/'SliTaz GNU\/Linux'/'SliTaz GNU\/Linux LiveUSB'/ $TARGET_ROOT/boot/$ST/$ST.msg 1.25 - fi 1.26 - if [ -f /media/cdrom/boot/isolinux/splash.lss ]; then 1.27 - cp /media/cdrom/boot/isolinux/splash.lss $TARGET_ROOT/boot/$ST 1.28 - fi 1.29 + cp /media/cdrom/boot/isolinux/splash.* $TARGET_ROOT/boot/$ST 1.30 cp /media/cdrom/boot/isolinux/*.txt $TARGET_ROOT/boot/$ST 1.31 cp /media/cdrom/boot/isolinux/*.cfg $TARGET_ROOT/boot/$ST 1.32 cp /media/cdrom/boot/isolinux/*.kbd $TARGET_ROOT/boot/$ST 1.33 cp /media/cdrom/boot/isolinux/*.c32 $TARGET_ROOT/boot/$ST 1.34 + sed -i s/'SliTaz GNU\/Linux'/'SliTaz GNU\/Linux LiveUSB'/ $TARGET_ROOT/boot/$ST/isolinux.*g 1.35 1.36 - # Modifing all cfg files. 1.37 - for cfg in $TARGET_ROOT/boot/$ST/*.cfg 1.38 + [ -f $TARGET_ROOT/boot/$ST/isolinux.msg ] && 1.39 + mv $TARGET_ROOT/boot/$ST/isolinux.msg $TARGET_ROOT/boot/$ST/$ST.msg 1.40 + # Modifing all cfg files and include file if exists. 1.41 + for cfg in $TARGET_ROOT/boot/$ST/*.cfg $TARGET_ROOT/boot/$ST/common.inc 1.42 do 1.43 - sed -i s/isolinux.msg/$ST.msg/ $cfg 1.44 + [ -f $cfg ] && sed -i s/isolinux.msg/$ST.msg/ $cfg 1.45 done 1.46 - 1.47 - # Modifing include file if exists. 1.48 - if [ -f $TARGET_ROOT/boot/$ST/common.inc ]; then 1.49 - sed -i -e "s/isolinux.msg/$ST.msg/" $TARGET_ROOT/boot/$ST/common.inc 1.50 - fi 1.51 - 1.52 - # Un-meta-ize a multi-in-one flavor 1.53 - if grep -qs "label slitaz" $TARGET_ROOT/boot/$ST/common.cfg ; then 1.54 - sed -i "s/isolinux/$ST/;s/label slitaz/label multi/" $TARGET_ROOT/boot/$ST/common.cfg 1.55 - if [ -f "$TARGET_ROOT/boot/$ST/$ST.msg" ]; then 1.56 - sed -i 's/\(.*\), flavors.*/ \1/' \ 1.57 - $TARGET_ROOT/boot/$ST/$ST.msg 1.58 - fi 1.59 - for i in $TARGET_ROOT/boot/$ST/$ST.$STE \ 1.60 - $TARGET_ROOT/boot/$ST/??.$STE \ 1.61 - $TARGET_ROOT/boot/$ST/??_??.$STE; do 1.62 - sed '/label /!d;/label /{s/label .*/\nlabel slitaz/;NN;s/rootfs..gz.*gz /rootfs.gz /;N;q}' \ 1.63 - < $i >> $i 1.64 - done 1.65 - fi 1.66 - 1.67 } 1.68 1.69 # Let user exit or reboot.