use PCT_OSTYPE instead of redefining OS (#1018)

This commit is contained in:
tteckster 2023-02-04 12:47:47 -05:00 committed by GitHub
parent 351161bc83
commit d54683396e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 81 additions and 159 deletions

View file

@ -111,8 +111,7 @@ msg_ok "Created Service"
echo "export TERM='xterm-256color'" >>/root/.bashrc
if ! getent shadow root | grep -q "^root:[^\!*]"; then
msg_info "Customizing Container"
OS=$(grep "^ID=" /etc/os-release | cut -d'=' -f2)
if [ "$OS" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi
if [ "$PCT_OSTYPE" == "debian" ]; then rm -rf /etc/motd /etc/update-motd.d/10-uname; else chmod -x /etc/update-motd.d/*; fi
touch ~/.hushlogin
GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf"
mkdir -p $(dirname $GETTY_OVERRIDE)