diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-17 23:11:56 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-08-17 23:11:56 +0200 |
commit | 70bcc76df415f9f4603560c0971fc75bffebf75e (patch) | |
tree | a83be1cc651af6f464811ed782df44f9cc1de1a7 /debian/local | |
parent | 0dc5ad1098dae15e2c6a1e1c8f939e0bae3c92ba (diff) |
Export kernel parameters into environment
Diffstat (limited to 'debian/local')
-rwxr-xr-x | debian/local/runsystem | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/debian/local/runsystem b/debian/local/runsystem index 3897f850..028ee2ef 100755 --- a/debian/local/runsystem +++ b/debian/local/runsystem @@ -24,12 +24,21 @@ echo "Console started." # Set the console device used by /sbin/reopen-console echo /dev/tty1 >/var/run/console-device -TERM=hurd -export TERM +export TERM=hurd # Preset the terminal type for /lib/debian-installer/detect-console -TERM_TYPE=virtual -export TERM_TYPE +export TERM_TYPE=virtual + +# Export kernel parameters into environment, like Linux does. +for i in $* +do + var=$(echo $i | sed "s/=.*$//") + [ $var != $i ] || continue + [ $var != root ] || continue + val=$(echo $i | sed "s/^$var=//") + echo $var is $val + eval export $var=\$val +done # Invoke init as linuxrc to work around pid != 1 exec /bin/busybox linuxrc |