added code to execute 'killall5 -15' in the halt script; this should
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 29 Oct 2005 16:53:30 +0000 (16:53 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Sat, 29 Oct 2005 16:53:30 +0000 (16:53 +0000)
fix the minilogd issues with CentOS and older RH releases

git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2222 94cd875c-1c1d-0410-91d2-eb244daf1a30

util-vserver/distrib/redhat/initpost

index 093c592..d4c6a38 100755 (executable)
@@ -72,7 +72,6 @@ pushd "$vdir"/etc/init.d &>/dev/null ||
        esac
     done
 
-    relink /bin/true halt
 popd >/dev/null
 
 pushd "$vdir"/sbin &>/dev/null
@@ -88,6 +87,14 @@ pushd "$vdir" &>/dev/null
 popd >/dev/null
 
 pushd "$vdir" &>/dev/null
+    cat <<EOF | $_CHROOT_SH truncate /etc/init.d/halt
+#! /bin/bash
+
+exec /sbin/killall5 -15
+EOF
+    # TODO: remove race/symlink-attack
+    chmod +x etc/init.d/halt
+    
     : | $_CHROOT_SH truncate /etc/sysctl.conf
     echo "none    /       none    defaults" | $_CHROOT_SH truncate /etc/fstab
     cat "$__DISTRIBDIR"/redhat/rc.sysinit   | $_CHROOT_SH truncate /etc/rc.d/rc.sysinit.vserver