From 8dcda0e05b0109e12280c446070b1fa94d0a6b4b Mon Sep 17 00:00:00 2001 From: Kim Hagen Date: Mon, 12 Nov 2018 10:07:52 +0100 Subject: Add uefi to vyos-build --- .../hooks/live/05-event_tty.chroot | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 data/live-build-config/hooks/live/05-event_tty.chroot (limited to 'data/live-build-config/hooks/live/05-event_tty.chroot') diff --git a/data/live-build-config/hooks/live/05-event_tty.chroot b/data/live-build-config/hooks/live/05-event_tty.chroot new file mode 100755 index 00000000..a00167f7 --- /dev/null +++ b/data/live-build-config/hooks/live/05-event_tty.chroot @@ -0,0 +1,34 @@ +#!/bin/sh + +if [ -r etc/event.d/tty1 ] ; then + echo I: Delay getty until rcX completes + sed -i 's/start on runlevel /start on stopped rc/' \ + etc/event.d/tty[1-6] + if [ ! -r etc/event.d/ttyS0 ] && [ -c dev/ttyS0 ] ; then + echo I: Enable serial console login + cat <<-EOF > etc/event.d/ttyS0 + # ttyS0 - getty + # + # This service maintains a getty on ttyS0 from the point the system is + # started until it is shut down again. + + start on stopped rc2 + start on stopped rc3 + start on stopped rc4 + start on stopped rc5 + + stop on runlevel 0 + stop on runlevel 1 + stop on runlevel 6 + + respawn + exec /sbin/getty 9600 ttyS0 vt100 + + EOF + fi +fi + +if [ -r etc/inittab ] && [ -c dev/ttyS0 ] && grep -q '^#T0:.*getty.*ttyS0' etc/inittab ; then + echo I: Enable serial console login + sed -i '/^#T0:/s|^#.*$|T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100|' etc/inittab +fi -- cgit v1.2.3