[Users] [PATCH 3/6] fedora/config/install-post: remove mingetty for
upstart case
Kir Kolyshkin
kir at openvz.org
Wed Dec 17 15:24:57 EST 2008
Since Fedora 10 init is replaced with upstart, so mingetty starts
not from /etc/inittab but from /etc/event.d/tty*. Handle this.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
templates/fedora/config/install-post | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/templates/fedora/config/install-post b/templates/fedora/config/install-post
index 59e002d..5be68e2 100755
--- a/templates/fedora/config/install-post
+++ b/templates/fedora/config/install-post
@@ -40,8 +40,12 @@ $VZCTL exec2 $VEID /usr/sbin/pwconv
# Disable root login
$VZCTL exec2 $VEID /usr/sbin/usermod -L root
-# Do not launch *getty on tty devices - they are not accessible from VPS
-sed -i -e '/getty/d' $VE_ROOT/etc/inittab
+# Do not launch *getty on tty devices - they are not accessible from CT
+if test -f $VE_ROOT/etc/inittab; then
+ sed -i -e '/getty/s/^/#/' $VE_ROOT/etc/inittab
+elif test -d $VE_ROOT/etc/event.d; then
+ rm -f $VE_ROOT/etc/event.d/tty*
+fi
# Disable klogd
if test -f $VE_ROOT/etc/init.d/syslog; then
--
1.5.6.5
More information about the Users
mailing list