Commit 0cd7f6f9 by Thomas Tanaka Committed by Stéphane Graber

Unable to login via console in OL7.2

There is container-getty.service with OL7.2 systemd, it is also used for managing the getty service, use that instead and not manually create it. Signed-off-by: 's avatarThomas Tanaka <thomas.tanaka@oracle.com>
parent 38788e48
...@@ -145,6 +145,9 @@ EOF ...@@ -145,6 +145,9 @@ EOF
# OL7 has systemd, no rc.sysinit # OL7 has systemd, no rc.sysinit
if [ $container_release_major = "7" ]; then if [ $container_release_major = "7" ]; then
# with newer systemd (OL7.2), getty service include container-getty.service
# let that be the one who manage the getty service instead
if [ ! -f $container_rootfs/usr/lib/systemd/system/container-getty@.service ]; then
# from mhw in the fedora template: We do need to disable the # from mhw in the fedora template: We do need to disable the
# "ConditionalPathExists=/dev/tty0" line or no gettys are started on # "ConditionalPathExists=/dev/tty0" line or no gettys are started on
# the ttys in the container. Lets do it in an override copy of the # the ttys in the container. Lets do it in an override copy of the
...@@ -160,6 +163,7 @@ EOF ...@@ -160,6 +163,7 @@ EOF
# We only want to spawn a getty on /dev/console in lxc, libvirt-lxc # We only want to spawn a getty on /dev/console in lxc, libvirt-lxc
# symlinks /dev/console to /dev/tty1 # symlinks /dev/console to /dev/tty1
sed -i '/Before=getty.target/a ConditionVirtualization=lxc' $container_rootfs/usr/lib/systemd/system/console-getty.service sed -i '/Before=getty.target/a ConditionVirtualization=lxc' $container_rootfs/usr/lib/systemd/system/console-getty.service
fi
# disable some systemd services, set default boot, sigpwr target # disable some systemd services, set default boot, sigpwr target
rm -f $container_rootfs/usr/lib/systemd/system/sysinit.target.wants/kmod-static-nodes.service rm -f $container_rootfs/usr/lib/systemd/system/sysinit.target.wants/kmod-static-nodes.service
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment