From ca2cbf6d84dcc96845fcc6521aebe3b5076cdb32 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Fri, 13 Jan 2023 12:55:10 +0100 Subject: change cmdline variable debvm.term to TERM Jochen Sprickerhof found that systemd interprets the TERM variable according to our intended meaning and applies it to pid 1. It doesn't apply it to serial-getty, though so we keep that code for now. --- share/customize-autologin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/customize-autologin.sh b/share/customize-autologin.sh index d7df555..b9a4a8b 100755 --- a/share/customize-autologin.sh +++ b/share/customize-autologin.sh @@ -16,7 +16,7 @@ mkdir "$TARGET/etc/systemd/system/$UNIT.d" ( echo '[Service]' - printf '%s\n' 'ExecStartPre=/bin/sed -n -e "s/.*\\(^\\| \\)debvm\\.term=\\([^ ]*\\).*/TERM=\\2/w/run/debvmterm" /proc/cmdline' + printf '%s\n' 'ExecStartPre=/bin/sed -n -e "s/^\\(.* \\)\\?\\(TERM=[^ ]*\\).*/\\2/w/run/debvmterm" /proc/cmdline' echo 'EnvironmentFile=-/run/debvmterm' echo 'ExecStart=' sed -n 's,^ExecStart=-/sbin/agetty ,&-a root ,p' "$TARGET/lib/systemd/system/$UNIT" -- cgit v1.2.3