]> wagnertech.de Git - projects.git/blobdiff - sh/sysd2sysv
cpp-d1064d
[projects.git] / sh / sysd2sysv
index dee45a78460814a017d93ad75b05f111e02d1b07..d1dec0ddbda35e43ca6556d4be58e25c5e109e57 100755 (executable)
@@ -8,12 +8,14 @@ then
 fi
 
 if [ ! -f /etc/init.d/$2 ]
-       cp /etc/sysd2sysv/$2 /etc/init.d/
+then
+       sed "s/%PROG%/$2/" /var/sysd2sysv/sysd2sysv.tpl > /etc/init.d/$2
+       chmod 755 /etc/init.d/$2
 fi
 
 if [ $1 = "enable" ]
 then
-       update-rc.d $2 defaults 100
+       update-rc.d $2 defaults 99
 elif [ $1 = "disable" ]
 then
        update-rc.d -f $2 remove