make links to statup scripts in /etc/rc.d relative
[openwrt/svn-archive/archive.git] / package / base-files / files / etc / rc.common
index 99e2a5db62da17844e560fce365a850f0b64f7b5..4f1a4a3a086331177a97de15d696cae97fef9725 100755 (executable)
@@ -17,12 +17,12 @@ reload() {
 
 restart() {
        trap '' TERM
-       stop
-       start
+       stop "$@"
+       start "$@"
 }
 
 boot() {
-       start
+       start "$@"
 }
 
 shutdown() {
@@ -38,8 +38,8 @@ disable() {
 enable() {
        name="$(basename "${initscript}")"
        disable
-       [ "$START" ] && ln -s "/etc/init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
-       [ "$STOP"  ] && ln -s "/etc/init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
+       [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
+       [ "$STOP"  ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
 }
 
 enabled() {