Browse Source

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 <kevin.carter@rackspace.com>
Kevin Carter 5 months ago
parent
commit
27bef72fce

+ 1
- 1
templates/prep-scripts/nspawn_centos_prep.sh.j2 View File

@@ -38,7 +38,7 @@ rm -f /tmp/package-transaction.txt
38 38
 rm -f /usr/bin/python || true
39 39
 ln -s /usr/bin/python2.7 /usr/bin/python
40 40
 
41
-for action in disable mask; do
41
+for action in disable; do
42 42
   systemctl ${action} sshd.service || true
43 43
 done
44 44
 

+ 1
- 1
templates/prep-scripts/nspawn_opensuse_prep.sh.j2 View File

@@ -39,7 +39,7 @@ zypper --gpg-auto-import-keys -n in --force-resolution -l {{ (nspawn_container_d
39 39
 rm -f /usr/bin/python || true
40 40
 ln -s /usr/bin/python2.7 /usr/bin/python
41 41
 
42
-for action in disable mask; do
42
+for action in disable; do
43 43
   systemctl ${action} wicked.service || true
44 44
   systemctl ${action} wickedd.service || true
45 45
   systemctl ${action} wickedd-auto4.service || true

+ 2
- 2
templates/prep-scripts/nspawn_ubuntu_prep.sh.j2 View File

@@ -38,11 +38,11 @@ rm /var/cache/apt/archives/lock || true
38 38
 rm -f /usr/bin/python || true
39 39
 ln -s /usr/bin/python2.7 /usr/bin/python
40 40
 
41
-for action in disable mask; do
41
+for action in disable; do
42 42
   systemctl ${action} resolvconf.service || true
43 43
   systemctl ${action} systemd-networkd-resolvconf-update.path || true
44 44
   systemctl ${action} systemd-networkd-resolvconf-update.service || true
45
-  systemctl ${action} sshd.service || true
45
+  systemctl ${action} ssh.service || true
46 46
 done
47 47
 
48 48
 systemctl enable systemd-hostnamed.service

Loading…
Cancel
Save