2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Handle newer SuSE

After SP4, suse drops mkinird requirement.

Switch to dracut -f in such a scenario.
This commit is contained in:
Jarrod Johnson 2023-05-16 14:51:27 -04:00
parent 8f4982e850
commit a523df80e8

View File

@ -549,7 +549,10 @@ class SuseHandler(OsHandler):
subprocess.check_call(cmd)
subprocess.check_call(['zypper', '-R', self.targpath, 'install'] + self.zyppargs)
os.symlink('/usr/lib/systemd/system/sshd.service', os.path.join(self.targpath, 'etc/systemd/system/multi-user.target.wants/sshd.service'))
args.cmd = ['mkinitrd']
if os.path.exists(os.path.join(self.targpath, 'sbin/mkinitrd')):
args.cmd = ['mkinitrd']
else:
args.cmd = ['dracut', '-f']
run_constrainedx(fancy_chroot, (args, self.targpath))