diff options
| author | Daniel Baumann <daniel@debian.org> | 2010-04-30 18:43:22 +0200 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:48:08 +0100 |
| commit | 58ca66342e48713c51d0390f754c2d186561681f (patch) | |
| tree | 770b4884cbc283d179ae0128e08e1044e64fdab4 /scripts/live-bottom/22serialtty | |
| parent | 30632f45739dbd70307d9173bd7dac5b00133118 (diff) | |
| download | live-boot-58ca66342e48713c51d0390f754c2d186561681f.tar.gz live-boot-58ca66342e48713c51d0390f754c2d186561681f.zip | |
Merging casper 1.195.
Diffstat (limited to 'scripts/live-bottom/22serialtty')
| -rwxr-xr-x | scripts/live-bottom/22serialtty | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/scripts/live-bottom/22serialtty b/scripts/live-bottom/22serialtty new file mode 100755 index 0000000..23ca8f0 --- /dev/null +++ b/scripts/live-bottom/22serialtty @@ -0,0 +1,52 @@ +#!/bin/sh + +#set -e + +# initramfs-tools header + +PREREQ="" + +prereqs() +{ + echo "${PREREQ}" +} + +case "${1}" in + prereqs) + prereqs + exit 0 + ;; +esac + +# live-initramfs header + +# this bottom script currently only works with upstart +if [ ! -d /root/etc/init ] +then + exit 0 +fi + +. /scripts/live-functions + +# live-initramfs script + +for ARGUMENT in $(cat /proc/cmdline) +do + case ${ARGUMENT} in + serialtty=*) + tty="${ARGUMENT#serialtty=}" + + log_begin_msg "Setting up a serial tty..." + +cat > /root/etc/init/${tty}.conf <<EOF +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [!2345] + +respawn +exec /sbin/getty 115200 ${tty} +EOF + + log_end_msg + ;; + esac +done |
