summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/customize-autologin.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/share/customize-autologin.sh b/share/customize-autologin.sh
index 5f87168..da386b5 100755
--- a/share/customize-autologin.sh
+++ b/share/customize-autologin.sh
@@ -11,7 +11,8 @@ set -eu
TARGET=$1
-cat >"$TARGET/etc/profile.d/resize_serial_term.sh" <<'EOF'
+if dpkg --compare-versions "$(dpkg-query --root "$TARGET" -f '${Version}' -W util-linux)" ge 2.33; then
+ cat >"$TARGET/etc/profile.d/resize_serial_term.sh" <<'EOF'
if test -n "${TERM-}" && test -n "${PS1-}"; then
case "$(tty)" in
/dev/tty[0-9]*)
@@ -23,6 +24,7 @@ if test -n "${TERM-}" && test -n "${PS1-}"; then
esac
fi
EOF
+fi
if test "$(dpkg-query --root "$TARGET" -f '${db:Status-Status}' -W systemd-sysv 2>/dev/null)" = installed; then
UNIT=serial-getty@.service