From 2559933f8f3f6466c9a29debf30617cf4686000e Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Tue, 14 Jul 2020 13:46:53 -0500 Subject: [PATCH] add openrc init system support to serial console element Change-Id: Id58e53a592b5f4601b893ba6c828bad07942b07b Signed-off-by: Matthew Thode --- .../elements/enable-serial-console/install.d/20-stty | 2 ++ 1 file changed, 2 insertions(+) diff --git a/diskimage_builder/elements/enable-serial-console/install.d/20-stty b/diskimage_builder/elements/enable-serial-console/install.d/20-stty index 6dd695c76..5322dac03 100755 --- a/diskimage_builder/elements/enable-serial-console/install.d/20-stty +++ b/diskimage_builder/elements/enable-serial-console/install.d/20-stty @@ -12,4 +12,6 @@ if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then install -m 0644 -o root -g root ${SCRIPTDIR}/ttySx.conf /etc/init/ttySx.conf elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then install -D -g root -o root -m 0644 ${SCRIPTDIR}/serial-console-udev.rules /etc/udev/rules.d/99-serial-console.rules +elif [ "$DIB_INIT_SYSTEM" == "openrc" ]; then + sed -r 's/^#(.*ttyS[0,1].*$)/\1/' -i /etc/inittab fi