add dummy net dependency to default runlevel; dmesg/syslog is now handled in baselayout
[util-vserver.git] / distrib / gentoo / initpost
index ad75b77..af89200 100755 (executable)
@@ -46,8 +46,9 @@ chrootsed() {
 
 
 # portage stuff
-$_CHROOT_SH mkdir /usr         2>/dev/null || :
+$_CHROOT_SH mkdir /usr 2>/dev/null || :
 $_CHROOT_SH mkdir /usr/portage 2>/dev/null || :
+$_CHROOT_SH mkdir /usr/portage/distfiles 2>/dev/null || :
 
 
 # gentoo initstyle magic
@@ -61,8 +62,16 @@ if test "$initstyle" == "gentoo"; then
        $_CHROOT_SH truncate   /lib/rcscripts/sh/init-vserver.sh
        $_CHROOT_SH chmod 0755 /lib/rcscripts/sh/init-vserver.sh
 
+       $_CAT "$__DISTRIBDIR"/gentoo/reboot.sh | \
+       $_CHROOT_SH truncate   /etc/init.d/reboot.sh
+       $_CHROOT_SH chmod 0755 /etc/init.d/reboot.sh
+
+       $_CAT "$__DISTRIBDIR"/gentoo/shutdown.sh | \
+       $_CHROOT_SH truncate   /etc/init.d/shutdown.sh
+       $_CHROOT_SH chmod 0755 /etc/init.d/shutdown.sh
+
        echo "!!!"
-       echo "!!! You have to install a service (e.g. syslog-ng) and add it to the"
+       echo "!!! You have to install a service (e.g. syslog/cron) and add it to the"
        echo "!!! default runlevel before you start the guest the first time!"
        echo "!!! Otherwise the guest will die as soon as it has finished booting."
        echo "!!!"
@@ -103,17 +112,18 @@ if $_CHROOT_SH testfile /etc/inittab; then
 fi
 
 
-# fix fstab for checkfs/localmount in baselayout >= 1.13
+# fix fstab for checkfs/localmount in baselayout-2
 # (does not affect any previous versions)
 echo ">>> Fixing fstab ... "
 echo "/dev/hdv1 / ufs defaults 0 0" | $_CHROOT_SH truncate /etc/fstab
 
 
-# always satisfy net dependency in baselayout >= 1.13
+# always satisfy net dependency in baselayout-2
 # (does not affect any previous versions)
 echo ">>> Providing dummy net dependency ... "
 $_CAT "$__DISTRIBDIR"/gentoo/net.vserver | \
 $_CHROOT_SH truncate /etc/init.d/net.vserver
 $_CHROOT_SH chmod 0755 /etc/init.d/net.vserver
+$_CHROOT_SH link /etc/init.d/net.vserver /etc/runlevels/boot/net.vserver
 
 popd &>/dev/null