Skip to content

Commit d342e98

Browse files
Merge pull request #949 from stgraber/main
systemd-generator: Fix console-getty handling
2 parents a3072be + d0e0b68 commit d342e98

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

distrobuilder/lxc.generator

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,15 @@ for d in /etc/systemd/system /usr/lib/systemd/system /lib/systemd/system; do
240240
fi
241241
done
242242
done
243+
244+
# Fix issue with console-getty on recent systemd.
245+
if [ "${SYSTEMD}" -ge 258 ]; then
246+
mkdir -p "/run/systemd/system/console-getty.service.d/"
247+
cat <<-EOF > /run/systemd/system/console-getty.service.d/override.conf
248+
[Service]
249+
ExecStart=
250+
ExecStart=-/sbin/agetty -o '-- \\u' --noreset --noclear --keep-baud 115200,57600,38400,9600 console
251+
StandardInput=null
252+
StandardOutput=null
253+
EOF
254+
fi

0 commit comments

Comments
 (0)