tazlito diff tazlito @ rev 330

writeiso: clean up some udev rules and ask to remove i18n settings
author Christophe Lincoln <pankso@slitaz.org>
date Wed Jan 15 09:25:11 2014 +0100 (2014-01-15)
parents 82b6cbf0addc
children d51c187bb06d
line diff
     1.1 --- a/tazlito	Wed Jan 15 09:21:12 2014 +0100
     1.2 +++ b/tazlito	Wed Jan 15 09:25:11 2014 +0100
     1.3 @@ -2245,15 +2245,16 @@
     1.4  		fi
     1.5  		check_root
     1.6  		# Start info
     1.7 -		echo ""
     1.8 -		echo -e "\033[1mWrite filesystem to ISO\033[0m
     1.9 -===============================================================================
    1.10 +		newline
    1.11 +		boldify "Write filesystem to ISO"
    1.12 +		separator
    1.13 +		cat << EOT
    1.14  The command writeiso will write the current filesystem into a suitable cpio
    1.15  archive (rootfs.gz) and generate a bootable ISO image (slitaz.iso).
    1.16  
    1.17 -Archive compression: $COMPRESSION"
    1.18 -		echo ""
    1.19 +$(boldify "Archive compression:") $(colorize 36 "$COMPRESSION")
    1.20  
    1.21 +EOT
    1.22  		# Save some space
    1.23  		rm /var/cache/tazpkg/* -r -f
    1.24  		rm -rf /home/slitaz/distro
    1.25 @@ -2273,11 +2274,31 @@
    1.26  			*)
    1.27  				echo -n "Keeping current sound card and screen configurations..." ;;
    1.28  		esac
    1.29 +		status && newline
    1.30 +		
    1.31 +		# Optionally remove i18n settings
    1.32 +		echo "Do you wish to remove local/keymap settings ? "
    1.33 +		echo -n "Press ENTER to keep or answer (No|yes|exit): "
    1.34 +		read anser
    1.35 +		case $anser in
    1.36 +			e|E|"exit"|Exit)
    1.37 +				exit 0 ;;
    1.38 +			y|Y|yes|Yes)
    1.39 +				echo "Removing current locale/keymap settings..."
    1.40 +				echo "" > /etc/locale.conf
    1.41 +				echo "" > /etc/keymap.conf ;;
    1.42 +			*)
    1.43 +				echo "Keeping current locale/keymap settings..." ;;
    1.44 +		esac
    1.45  		status
    1.46 +		
    1.47 +		# Clean-up files by default
    1.48 +		echo "" > /etc/udev/rules.d/70-persistent-net.rules
    1.49 +		echo "" > /etc/udev/rules.d/70-persistant-cd.rules
    1.50  
    1.51 -		cd /
    1.52  		# Create list of files including default user files since it is defined in /etc/passwd
    1.53  		# and some new users might have been added.
    1.54 +		cd /
    1.55  		find bin etc init sbin var dev lib root usr home >/tmp/list
    1.56  
    1.57  		for dir in proc sys tmp mnt media media/cdrom media/flash \