X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=distrib%2Fgentoo%2Finitpost;h=a61ab1b9773b991f7c72fb0bde04e33b8ad725ef;hb=3d2cab9a6a00cf148c1cd586ea9bf6f75df62673;hp=ee6e69239bbbc096fe13cf9fbda642bad6155b28;hpb=f4bbc30e0100b45835690d8df5438f542c2b9bd2;p=util-vserver.git diff --git a/distrib/gentoo/initpost b/distrib/gentoo/initpost index ee6e692..a61ab1b 100755 --- a/distrib/gentoo/initpost +++ b/distrib/gentoo/initpost @@ -83,17 +83,22 @@ if test "$initstyle" == "gentoo"; then echo "!!! Consult the Gentoo Handbook on how to chroot and install" echo "!!! packages into the guest environment." echo "!!!" +else + # fix gettys in inittab + if $_CHROOT_SH testfile /etc/inittab; then + echo ">>> Fixing inittab ... " + chrootsed /etc/inittab \ + -e 's/\(^[^#].*getty.*$\)/#\1/' + fi fi - # unneeded runlevel scripts -echo ">>> Fixing default runlevel scripts ... " if test $have_openrc -ne 1; then + echo ">>> Fixing default runlevel scripts ... " $_CHROOT_SH rm /etc/runlevels/boot/{clock,consolefont,keymaps,modules,net.lo} 2>/dev/null || : $_CHROOT_SH rm /etc/runlevels/default/{hdparm,netmount} 2>/dev/null || : fi - # setting hostname if test -r "$cfgdir"/uts/nodename && $_CHROOT_SH testfile /etc/conf.d/hostname; then echo ">>> Setting hostname ... " @@ -101,7 +106,6 @@ if test -r "$cfgdir"/uts/nodename && $_CHROOT_SH testfile /etc/conf.d/hostname; -e "s:\(HOSTNAME\)=\"\(.*\)\":\1=\"$(< "$cfgdir"/uts/nodename)\":i" fi - # fix syslog-ng.conf if $_CHROOT_SH testfile /etc/syslog-ng/syslog-ng.conf; then echo ">>> Fixing syslog-ng.conf ... " @@ -110,15 +114,6 @@ if $_CHROOT_SH testfile /etc/syslog-ng/syslog-ng.conf; then -e 's:\(.*console_all.*\):#\1:g' fi - -# fix gettys in inittab -if $_CHROOT_SH testfile /etc/inittab; then - echo ">>> Fixing inittab ... " - chrootsed /etc/inittab \ - -e 's/\(^[^#].*getty.*$\)/#\1/' -fi - - # fix fstab for checkfs/localmount in baselayout-2 # (does not affect any previous versions) if test $have_openrc -ne 1; then