fixed kernel-pkg installation
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 27 Feb 2004 19:55:09 +0000 (19:55 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 27 Feb 2004 19:55:09 +0000 (19:55 +0000)
fixed initscript update

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

util-vserver/distrib/redhat/initpost

index 91501b7..b367094 100755 (executable)
 vdir=$1/vdir
 . "$2"
 
+function relink
+{
+    test ! -e "$2" -o -L "$2" || mv -f "$2"{,.orig}
+    ln -s "$1" "$2"
+}
 
 pushd "$vdir"/etc/init.d &>/dev/null ||
     pushd "$vdir"/etc/rc.d/init.d &>/dev/null || exit 1
@@ -33,9 +38,11 @@ pushd "$vdir"/etc/init.d &>/dev/null ||
        esac
     done
 
-    mv -f halt{,.orig}
-    ln -s /bin/true halt
-    
+    relink /bin/true halt
+popd >/dev/null
+
+pushd "$vdir"/sbin &>/dev/null
+    relink /bin/true new-kernel-pkg
 popd >/dev/null
 
 pushd "$vdir"/etc &>/dev/null