From: Benedikt Boehm Date: Tue, 27 Mar 2007 18:00:48 +0000 (+0000) Subject: force halt/reboot if using gentoo init style, enable syslog stub by default for gento... X-Git-Tag: release-0.30.214~82 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fa4aa6f4c09b0eba6db2b96f43017973a10544b;p=util-vserver.git force halt/reboot if using gentoo init style, enable syslog stub by default for gentoo guests git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2523 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/distrib/gentoo/initpost b/distrib/gentoo/initpost index ad75b77..1e457c3 100755 --- a/distrib/gentoo/initpost +++ b/distrib/gentoo/initpost @@ -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 "!!!" diff --git a/distrib/gentoo/initpre b/distrib/gentoo/initpre index 4d18d69..374c134 100755 --- a/distrib/gentoo/initpre +++ b/distrib/gentoo/initpre @@ -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 index 0000000..06e6896 --- /dev/null +++ b/distrib/gentoo/reboot.sh @@ -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 index 0000000..be53971 --- /dev/null +++ b/distrib/gentoo/shutdown.sh @@ -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