wok-undigest rev 667

busybox-boot: fix for initramfs (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Mar 10 12:46:45 2012 +0100 (2012-03-10)
parents cc97e296e0d5
children 7f1938b8dc79
files busybox-boot/receipt
line diff
     1.1 --- a/busybox-boot/receipt	Sat Mar 10 12:42:11 2012 +0100
     1.2 +++ b/busybox-boot/receipt	Sat Mar 10 12:46:45 2012 +0100
     1.3 @@ -39,17 +39,21 @@
     1.4  mount -t sysfs none /sys
     1.5  mount -t devpts none /dev/pts
     1.6  
     1.7 -TTY=\$(tty)
     1.8 +TTY=\$(tty) 2>/dev/null
     1.9 +TTY=\${TTY:-/dev/tty1}
    1.10  EOT
    1.11  	$jslinux && cat >> $fs/init <<EOT
    1.12 -stty -F \$TTY rows 30
    1.13 +stty -F \$TTY rows 30 2>/dev/null
    1.14  EOT
    1.15  	cat >> $fs/init <<EOT
    1.16  
    1.17  busybox | sed '/Current/,\$!d'
    1.18  while true; do
    1.19 -	#setsid sh -c "exec sh <\$TTY >\$TTY 2>&1"
    1.20 -	sh <\$TTY >\$TTY 2>&1
    1.21 +	if [ -x /bin/setsid ]; then
    1.22 +		setsid sh -c "exec sh <\$TTY >\$TTY 2>&1"
    1.23 +	else
    1.24 +		sh <\$TTY >\$TTY 2>&1
    1.25 +	fi
    1.26  done
    1.27  EOT
    1.28  	chmod +x $fs/init