X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=distrib%2Fdebian%2Finitpost;h=1cf629a6a1d08ef162cbed71a783a87fefd7c787;hb=4db12f3b28c20f8b013c27c6cf0fbae5b336732f;hp=ccb6cabb56798fba7201cedd8c65e0e0c5c9946e;hpb=e73af524ef22868d4980ae13430c205798603c41;p=util-vserver.git diff --git a/distrib/debian/initpost b/distrib/debian/initpost index ccb6cab..1cf629a 100755 --- a/distrib/debian/initpost +++ b/distrib/debian/initpost @@ -104,9 +104,33 @@ if $_CHROOT_SH testfile /etc/init.d/sendsigs; then -e 's/^\(\s\+splash_back\)$/#\1/' fi -echo -echo ">>> Executing post install script ... " -echo + +# upstart fixing +if $_CHROOT_SH testfile /sbin/initctl; then + for i in etc/init/*; do + i=${i##*/} + case "$i" in + (control-alt-delete.conf|rc.conf) + ;; + (rsyslog.conf|syslog-ng.conf) + ;; + (*) + chrootsed /etc/init/$i \ + -e 's/^/#/' + ;; + esac + done + $_CHROOT_SH truncate /etc/init/vserver.conf </dev/null || : @@ -118,14 +142,25 @@ export LANG=C LC_ALL=C $_CHROOT_SH testfile /usr/sbin/locale-gen && \ $_VSERVER "$NAME" exec /usr/sbin/locale-gen -for i in bootlogd checkfs checkroot halt hwclock.sh ifupdown klogd \ - libdevmapper1.02 makedev module-init-tools mountall.sh \ - mountdevsubfs.sh mountnfs.sh mountkernfs.sh mountvirtfs \ - networking reboot setserial single stop-bootlogd \ - stop-bootlogd-single umountfs umountnfs.sh umountroot \ - urandom; do - $_VSERVER "$NAME" exec update-rc.d -f "$i" remove +have_halt= +test "$(cat "$cfgdir"/apps/init/style 2>/dev/null)" != "plain" || \ + have_halt=halt + +pushd etc/init.d &>/dev/null +for i in *; do + case "$i" in + (sysklogd|syslog-ng|rsyslog|dsyslog) + ;; + (README|skeleton|sendsigs|single|rc|rc.local|rcS) + ;; + ($have_halt) + ;; + (*) + $_VSERVER "$NAME" exec update-rc.d -f "$i" remove + ;; + esac done +popd &>/dev/null # stop the vserver stopSleepingGuest "$NAME" &>/dev/null || :