tazusb rev 207

loram & many-in-1 support for writefs
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 19 17:18:00 2020 +0000 (5 months ago)
parents ac809a573f3c
children f48301443461
files tazusb
line diff
     1.1 --- a/tazusb	Wed Aug 19 16:02:37 2020 +0000
     1.2 +++ b/tazusb	Wed Aug 19 17:18:00 2020 +0000
     1.3 @@ -321,7 +321,8 @@
     1.4  	sed -i "s/LABEL=packages-[^,]*/UUID=$UUID/g" $(grep -il append $TARGET_ROOT/boot/$ST/*)
     1.5  
     1.6  	# Add home=$UUID to kernel line in extlinux or syslinux.cfg
     1.7 -	sed -i -e "s/\(root=.*\)/\1 home=$UUID/" $(grep -il append $TARGET_ROOT/boot/$ST/*)
     1.8 +	sed -i -e "s/\(root=.*\)/\1 home=$UUID/" -e '/LABEL md5sum/,/append md5sum/d' \
     1.9 +		$(grep -il append $TARGET_ROOT/boot/$ST/*)
    1.10  
    1.11  	# Splash screen and help files.
    1.12  	cp /media/cdrom/boot/isolinux/splash.*	$TARGET_ROOT/boot/$ST
    1.13 @@ -541,15 +542,24 @@
    1.14  		size=$(du -sh "$ROOTFS_PATH" | cut -f1)
    1.15  
    1.16  		# If the bootable medium is where it should be, copy across
    1.17 -		if [ -e /home/boot/bzImage* ]; then
    1.18 +		if [ "$(ls /home/boot/bzImage*)" ]; then
    1.19  			longline "$(_ 'Moving %s to media. Remember to unmount for delayed writes!' "$ROOTFS")"
    1.20  
    1.21 -			# Move the old filesystem with the unix timestamp for reference
    1.22 -			if [ -e /home/boot/previous.gz ]; then
    1.23 -				mv /home/boot/previous.gz /home/boot/rootfs.gz.$(date -r /home/boot/previous.gz +%s)
    1.24 +			CONFIG=$(ls /home/boot/*linux/*linux.c*)
    1.25 +			if grep -qs 'gz,' $CONFIG; then
    1.26 +
    1.27 +				# Disable loram & many-in-1
    1.28 +				[ -s /home/boot/rootfs.gz ] && mv /home/boot/rootfs.gz /home/boot/rootfs.gz.loram
    1.29 +				cp $CONFIG $CONFIG.org
    1.30 +				sed -i 's|rootfs.*\.gz|rootfs.gz|' $CONFIG
    1.31 +			else
    1.32 +				# Move the old filesystem with the unix timestamp for reference
    1.33 +				if [ -e /home/boot/previous.gz ]; then
    1.34 +					mv /home/boot/previous.gz /home/boot/rootfs.gz.$(date -r /home/boot/previous.gz +%s)
    1.35 +				fi
    1.36 +			
    1.37 +				mv /home/boot/rootfs.gz /home/boot/previous.gz
    1.38  			fi
    1.39 -			
    1.40 -			mv /home/boot/rootfs.gz /home/boot/previous.gz
    1.41  			mv "$ROOTFS_PATH" /home/boot/rootfs.gz
    1.42  			_ '%s is located in %s' 'rootfs.gz' '/home/boot'
    1.43  		else