force halt/reboot if using gentoo init style, enable syslog stub by default for gento...
authorBenedikt Boehm <hollow@gentoo.org>
Tue, 27 Mar 2007 18:00:48 +0000 (18:00 +0000)
committerBenedikt Boehm <hollow@gentoo.org>
Tue, 27 Mar 2007 18:00:48 +0000 (18:00 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2523 94cd875c-1c1d-0410-91d2-eb244daf1a30

distrib/gentoo/initpost
distrib/gentoo/initpre
distrib/gentoo/reboot.sh [new file with mode: 0644]
distrib/gentoo/shutdown.sh [new file with mode: 0644]

index ad75b77..1e457c3 100755 (executable)
@@ -61,8 +61,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 "!!!"
index 4d18d69..374c134 100755 (executable)
@@ -43,6 +43,11 @@ else
 fi
 
 
+# prevent dmesg errors/warnings
+echo ">>> Enabling dummy /proc/kmsg"
+echo syslog >> "$1"/ccapabilities
+
+
 # initstyle sanity
 initstyle=sysv
 test -e "$1"/apps/init/style && initstyle=$(<"$1"/apps/init/style)
diff --git a/distrib/gentoo/reboot.sh b/distrib/gentoo/reboot.sh
new file mode 100644 (file)
index 0000000..06e6896
--- /dev/null
@@ -0,0 +1,5 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# gentoo init style needs this (and nothing else)
+/sbin/reboot -f
diff --git a/distrib/gentoo/shutdown.sh b/distrib/gentoo/shutdown.sh
new file mode 100644 (file)
index 0000000..be53971
--- /dev/null
@@ -0,0 +1,5 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# gentoo init style needs this (and nothing else)
+/sbin/halt -f