wok-6.x rev 18799

syslinux/taziso/bootiso: custom config support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Jan 10 10:39:46 2016 +0100 (2016-01-10)
parents cf52fb976ae5
children ad074da5360c
files syslinux/stuff/iso2exe/taziso
line diff
     1.1 --- a/syslinux/stuff/iso2exe/taziso	Sat Jan 09 18:56:52 2016 +0100
     1.2 +++ b/syslinux/stuff/iso2exe/taziso	Sun Jan 10 10:39:46 2016 +0100
     1.3 @@ -536,18 +536,25 @@
     1.4  
     1.5  bootiso()
     1.6  {
     1.7 +	cd /tmp
     1.8  	for i in $(ls_r $media/boot/rootfs*gz); do
     1.9  		grep -q ' lm ' /proc/cpuinfo && [ -s ${i}64 ] && i=${i}64
    1.10  		cat $i
    1.11  		n=$((4 - ($(stat -c %s $i) % 4)))
    1.12  		[ $n -eq 4 ] || dd if=/dev/zero bs=1 count=$n
    1.13 -	done > /tmp/initrd$$
    1.14 +	done > initrd$$
    1.15 +	cmdline="root=/dev/null autologin lang=$LANG"
    1.16 +	[ -s /etc/keymap.conf ] && cmdline="$cmdline kmap=$(cat /etc/keymap.conf)"
    1.17 +	[ -s /etc/TZ ] && cmdline="$cmdline tz=$(cat /etc/TZ)"
    1.18 +	rm -f cmdline initrd 2> /dev/null
    1.19 +	getcustomconf kexec >/dev/null
    1.20 +	[ -s cmdline ] && cmdline="$cmdline $(cat cmdline)" && rm cmdline
    1.21 +	[ -s initrd ] && cat initrd >> initrd$$ && rm initrd
    1.22  	kernel=$media/boot/bzImage
    1.23  	grep -q ' lm ' /proc/cpuinfo && [ -s ${kernel}64 ] && kernel=${kernel}64
    1.24  	. /etc/locale.conf
    1.25 -	kexec -l $kernel --initrd /tmp/initrd$$ --command-line \
    1.26 -	   "root=/dev/null autologin lang=$LANG kmap=$(cat /etc/keymap.conf)" &&
    1.27 -	rm -f /tmp/initrd$$
    1.28 +	kexec -l $kernel --initrd initrd$$ --command-line "$cmdline" &&
    1.29 +	rm -f initrd$$
    1.30  	quit "kexec -e"
    1.31  }
    1.32