Skip to content

Commit 51d4a5f

Browse files
author
q66
committed
enable serial console in live when requested
also blacklist more agettys to fix the hvc0/hvsi0 issue Closes #194
1 parent be02f16 commit 51d4a5f

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

dracut/vmklive/getty-serial.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3+
# ex: ts=8 sw=4 sts=4 et filetype=sh
4+
5+
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
6+
7+
CONSOLE=$(getarg console)
8+
case "$CONSOLE" in
9+
*ttyS0*)
10+
ln -s /etc/sv/agetty-ttyS0 ${NEWROOT}/etc/runit/runsvdir/default/
11+
;;
12+
*hvc0*)
13+
ln -s /etc/sv/agetty-hvc0 ${NEWROOT}/etc/runit/runsvdir/default/
14+
;;
15+
*hvsi0*)
16+
ln -s /etc/sv/agetty-hvsi0 ${NEWROOT}/etc/runit/runsvdir/default/
17+
;;
18+
esac

dracut/vmklive/module-setup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ install() {
2525

2626
inst_hook pre-pivot 01 "$moddir/adduser.sh"
2727
inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh"
28+
inst_hook pre-pivot 02 "$moddir/getty-serial.sh"
2829
inst_hook pre-pivot 03 "$moddir/locale.sh"
2930
inst_hook pre-pivot 04 "$moddir/services.sh"
3031
}

dracut/vmklive/services.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ done
2222
for f in $SERVICEDIR/*; do
2323
_service=${f##*/}
2424
case "${_service}" in
25-
agetty-console|agetty-generic|agetty-serial|agetty-tty[SAU]*|sulogin|dhcpcd-*|iptables|ip6tables|wpa_supplicant|pulseaudio|lvmetad|dmeventd|mdadm) ;; # ignored
25+
agetty-console|agetty-generic|agetty-serial|agetty-tty[SAU]*|agetty-hv*|sulogin|dhcpcd-*|iptables|ip6tables|wpa_supplicant|pulseaudio|lvmetad|dmeventd|mdadm) ;; # ignored
2626
dhcpcd) [ -n "$dhcpcd" ] && ln -sf ${f##$NEWROOT} $NEWROOT/etc/runit/runsvdir/default/;;
2727
*) ln -sf ${f##$NEWROOT} $NEWROOT/etc/runit/runsvdir/default/;;
2828
esac

0 commit comments

Comments
 (0)