diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-09-21 00:01:56 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-09-21 00:01:56 +0200 |
commit | 17b47a9f3e8941705e036ad8af2c499c2b6c36cc (patch) | |
tree | 836990a4e96b8563faa0086843971bf503459a35 /debian/local | |
parent | 6ab8b3f51157788fb1f0e1d726bd0131ee96b9f5 (diff) |
Do not start the Hurd console if the TERM variable is given
* debian/local/runsystem: Do not start the Hurd console if the TERM variable
is given. Should permit mach-console install for better debugging as well
as Xen or sub-hurd support.
Diffstat (limited to 'debian/local')
-rwxr-xr-x | debian/local/runsystem | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/debian/local/runsystem b/debian/local/runsystem index 150d4c9c..daff8a0b 100755 --- a/debian/local/runsystem +++ b/debian/local/runsystem @@ -8,22 +8,6 @@ export PATH /hurd/mach-defpager -# Touch the first tty so that the Hurd console is certain to pick it -# and not some random other tty. -sleep 1 -touch /dev/tty1 - -echo -n "Starting the Hurd console..." -console -d vga -g -d pc_kbd -c /dev/vcs & -sleep 1 - -# Switch over -exec < /dev/tty1 > /dev/tty1 2>&1 -echo "Console started." - -# Set the console device used by /sbin/reopen-console -echo /dev/tty1 >/var/run/console-device - # Get all kernel parameters that can be exported as environment variables envvars="$(echo $* | tr ' ' '\012' | egrep '^[-_/[:alnum:]]+=.*$')" @@ -42,8 +26,33 @@ for i in $envvars ; do noshell=*) sed -i '/^tty[12]/s/^/#/' /etc/inittab ;; + TERM=*) + term=yes + ;; esac done +if [ "$term" != yes ] +then + # No terminal type set, assume we can start the Hurd console + + # Touch the first tty so that the Hurd console is certain to pick it + # and not some random other tty. + sleep 1 + touch /dev/tty1 + + echo -n "Starting the Hurd console..." + console -d vga -g -d pc_kbd -c /dev/vcs & + sleep 1 + + # Switch over + envvars="$envvars TERM=hurd" + exec < /dev/tty1 > /dev/tty1 2>&1 + echo "Console started." + + # Set the console device used by /sbin/reopen-console + echo /dev/tty1 >/var/run/console-device +fi + # Preset the terminal type for /lib/debian-installer/detect-console -eval exec env - $envvars TERM=hurd TERM_TYPE=virtual $init +eval exec env - $envvars TERM_TYPE=virtual $init |