]> git.proxmox.com Git - mirror_lxc.git/commitdiff
templates/opensuse: getty.target.wants does not always exists
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 1 Aug 2017 06:03:07 +0000 (08:03 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 1 Aug 2017 07:15:25 +0000 (09:15 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
templates/lxc-opensuse.in

index 9f3a827be114c3854d26ddaff6eac3b5f0b84943..2cb6be6db98fc1b1439caae64b199412f5086d8c 100644 (file)
@@ -102,8 +102,10 @@ EOF
     ln -s /dev/null $rootfs/etc/systemd/system/proc-sys-fs-binfmt_misc.automount
     ln -s /dev/null $rootfs/etc/systemd/system/console-shell.service
     ln -s /dev/null $rootfs/etc/systemd/system/systemd-vconsole-setup.service
+    # enable getty and console services
     sed -e 's/ConditionPathExists=.*//' $rootfs/usr/lib/systemd/system/getty@.service > $rootfs/etc/systemd/system/getty@.service
     ln -s getty@.service $rootfs/etc/systemd/system/getty@tty1.service
+    mkdir -p $rootfs/etc/systemd/system/getty.target.wants/
     ln -s ../getty@.service $rootfs/etc/systemd/system/getty.target.wants/getty@console.service
     ln -s -f ../getty@.service $rootfs/etc/systemd/system/getty.target.wants/getty@tty1.service
     ln -s ../getty@.service $rootfs/etc/systemd/system/getty.target.wants/getty@tty2.service