# HG changeset patch # User Rob Landley # Date 1282372382 18000 # Node ID 1a24dc2bb3cbc7e882515d4a09608340953c8fb8 # Parent 45889d1397c134e4b075e74fd5981ef4b9faaa7e Make sure PATH and CONSOLE are properly exported even when kernel command line doesn't provide the right data. diff -r 45889d1397c1 -r 1a24dc2bb3cb sources/root-filesystem/sbin/init.sh --- a/sources/root-filesystem/sbin/init.sh Fri Aug 20 18:42:02 2010 -0500 +++ b/sources/root-filesystem/sbin/init.sh Sat Aug 21 01:33:02 2010 -0500 @@ -17,6 +17,11 @@ [ -z "$CPUS" ] && export CPUS=1 export PS1='($HOST:$CPUS) \w \$ ' +# Make sure $PATH is exported, even if not set on kernel command line. +# (The shell gives us a default, but it's local, not exported.) + +export PATH + # If we're running under qemu, do some more setup if [ $$ -eq 1 ] then @@ -53,8 +58,9 @@ mount -o ro $MNTDEV /mnt fi - CONSOLE="$(sed -n 's@.* console=\(/dev/\)*\([^ ]*\).*@\2@p' /proc/cmdline)" - [ -z "$CONSOLE" ] && CONSOLE=/dev/console + [ -z "$CONSOLE" ] && + CONSOLE="$(sed -n 's@.* console=\(/dev/\)*\([^ ]*\).*@\2@p' /proc/cmdline)" + [ -z "$CONSOLE" ] && CONSOLE=console if [ -z "$DISTCC_HOSTS" ] then