2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 02:52:07 +00:00

Add ssh to default services of a built ubuntu image

This commit is contained in:
Jarrod Johnson 2024-07-23 11:05:51 -04:00
parent cf4475cfcc
commit 8f58567a70

View File

@ -661,6 +661,12 @@ class DebHandler(OsHandler):
run_constrainedx(fancy_chroot, (args, self.targpath))
args.cmd = ['apt-get', '-y', 'install'] + self.includepkgs
run_constrainedx(fancy_chroot, (args, self.targpath))
servicefile = os.path.join(self.targpath, 'usr/lib/systemd/system/ssh.service')
if os.path.exists(servicefile):
os.symlink('/usr/lib/systemd/system/ssh.service', os.path.join(self.targpath, 'etc/systemd/system/multi-user.target.wants/ssh.service'))
else:
os.symlink('/usr/lib/systemd/system/sshd.service', os.path.join(self.targpath, 'etc/systemd/system/multi-user.target.wants/sshd.service'))
class ElHandler(OsHandler):