From 27bef72fce439519000acdfc18cfca1d3f0eb58a Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 21 Nov 2018 13:00:51 -0600 Subject: [PATCH] Change ssh variable in Ubuntu and remove masks The ssh service on ubuntu based systems is "ssh" which is established by the service unit path `/lib/systemd/system/ssh.service`. When running the service will respond to the name "sshd" however this is just an alias. The image prep task used to mask ssh after it was disabled. While in practice thats OK, its really a little overkill and provides little benifit. In prep the containers will have ssh disabled, but in the event its needed it can be easily enabled wihout having to remember to unmask. Change-Id: I2edb3ca7cae6e05f15ab29b1d50ff1281762905e Signed-off-by: Kevin Carter --- templates/prep-scripts/nspawn_centos_prep.sh.j2 | 2 +- templates/prep-scripts/nspawn_opensuse_prep.sh.j2 | 2 +- templates/prep-scripts/nspawn_ubuntu_prep.sh.j2 | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/prep-scripts/nspawn_centos_prep.sh.j2 b/templates/prep-scripts/nspawn_centos_prep.sh.j2 index 861b752..f143809 100644 --- a/templates/prep-scripts/nspawn_centos_prep.sh.j2 +++ b/templates/prep-scripts/nspawn_centos_prep.sh.j2 @@ -38,7 +38,7 @@ rm -f /tmp/package-transaction.txt rm -f /usr/bin/python || true ln -s /usr/bin/python2.7 /usr/bin/python -for action in disable mask; do +for action in disable; do systemctl ${action} sshd.service || true done diff --git a/templates/prep-scripts/nspawn_opensuse_prep.sh.j2 b/templates/prep-scripts/nspawn_opensuse_prep.sh.j2 index 90d5bf2..dbce150 100644 --- a/templates/prep-scripts/nspawn_opensuse_prep.sh.j2 +++ b/templates/prep-scripts/nspawn_opensuse_prep.sh.j2 @@ -39,7 +39,7 @@ zypper --gpg-auto-import-keys -n in --force-resolution -l {{ (nspawn_container_d rm -f /usr/bin/python || true ln -s /usr/bin/python2.7 /usr/bin/python -for action in disable mask; do +for action in disable; do systemctl ${action} wicked.service || true systemctl ${action} wickedd.service || true systemctl ${action} wickedd-auto4.service || true diff --git a/templates/prep-scripts/nspawn_ubuntu_prep.sh.j2 b/templates/prep-scripts/nspawn_ubuntu_prep.sh.j2 index 5f88652..90a5425 100644 --- a/templates/prep-scripts/nspawn_ubuntu_prep.sh.j2 +++ b/templates/prep-scripts/nspawn_ubuntu_prep.sh.j2 @@ -38,11 +38,11 @@ rm /var/cache/apt/archives/lock || true rm -f /usr/bin/python || true ln -s /usr/bin/python2.7 /usr/bin/python -for action in disable mask; do +for action in disable; do systemctl ${action} resolvconf.service || true systemctl ${action} systemd-networkd-resolvconf-update.path || true systemctl ${action} systemd-networkd-resolvconf-update.service || true - systemctl ${action} sshd.service || true + systemctl ${action} ssh.service || true done systemctl enable systemd-hostnamed.service