Update install.func

This commit is contained in:
tteckster
2023-05-10 17:00:06 -04:00
committed by GitHub
parent f49744bbfa
commit 87c5d657c0

View File

@@ -114,23 +114,3 @@ motd_ssh() {
systemctl restart sshd
fi
}
customize() {
msg_info "Customizing Container"
GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf"
mkdir -p $(dirname $GETTY_OVERRIDE)
cat <<EOF >$GETTY_OVERRIDE
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM
EOF
systemctl daemon-reload
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
msg_ok "Customized Container"
}
root() {
if ! getent shadow root | grep -q "^root:[^\!*]"; then
customize
fi
}