summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-04-30 18:43:22 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:48:08 +0100
commit58ca66342e48713c51d0390f754c2d186561681f (patch)
tree770b4884cbc283d179ae0128e08e1044e64fdab4
parent30632f45739dbd70307d9173bd7dac5b00133118 (diff)
downloadlive-boot-58ca66342e48713c51d0390f754c2d186561681f.tar.gz
live-boot-58ca66342e48713c51d0390f754c2d186561681f.zip
Merging casper 1.195.
-rw-r--r--docs/ChangeLog.casper12
-rwxr-xr-xscripts/live-bottom/22serialtty52
-rwxr-xr-xscripts/live-bottom/25configure_init4
3 files changed, 66 insertions, 2 deletions
diff --git a/docs/ChangeLog.casper b/docs/ChangeLog.casper
index 4e0e312..18bf8c0 100644
--- a/docs/ChangeLog.casper
+++ b/docs/ChangeLog.casper
@@ -1,3 +1,15 @@
+casper (1.195) karmic; urgency=low
+
+ [ Oliver Grawert ]
+ * add support for serialtty= cmdline option for debugging purposes in live
+ sessions
+
+ [ Colin Watson ]
+ * Upstart moved /etc/event.d/ to /etc/init/; adjust shell provision on VTs
+ to match (LP: #434769).
+
+ -- Colin Watson <cjwatson@ubuntu.com> Mon, 28 Sep 2009 10:52:32 +0100
+
casper (1.194) karmic; urgency=low
* Fix 47unr_ubiquity shell code to make slightly more sense.
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
diff --git a/scripts/live-bottom/25configure_init b/scripts/live-bottom/25configure_init
index f55dd0e..b90a7db 100755
--- a/scripts/live-bottom/25configure_init
+++ b/scripts/live-bottom/25configure_init
@@ -73,9 +73,9 @@ then
sed -i -e "s|^\([^:]*:[^:]*:[^:]*\):.*getty.*\<\(tty[0-9]*\).*$|\1:/bin/login -f ${USERNAME} </dev/\2 >/dev/\2 2>\&1|" /root/etc/inittab
fi
- if [ "/root/etc/event.d/tty*" != "$(echo /root/etc/event.d/tty*)" ]
+ if [ "/root/etc/init/tty*" != "$(echo /root/etc/init/tty*)" ]
then
- for f in /root/etc/event.d/tty*
+ for f in /root/etc/init/tty*
do
sed -i -e "/^respawn$/!s|^respawn.*|respawn /bin/login -f ${USERNAME} </dev/$(basename ${f}) > /dev/$(basename ${f}) 2>\&1|" ${f}
sed -i -e "s|^exec.*|exec /bin/login -f ${USERNAME} </dev/$(basename ${f}) > /dev/$(basename ${f}) 2>\&1|" ${f}