diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index f39b69464ea..5dcbf5138d5 100755 --- a/package/base-files/files/etc/rc.common +++ b/package/base-files/files/etc/rc.common @@ -55,7 +55,12 @@ enable() { enabled() { name="$(basename "${initscript}")" - [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ] + name="${name##[SK][0-9][0-9]}" + { + [ -z "${START:-}" ] || [ -L "$IPKG_INSTROOT/etc/rc.d/S${START}$name" ] + } && { + [ -z "${STOP:-}" ] || [ -L "$IPKG_INSTROOT/etc/rc.d/K${STOP}$name" ] + } } depends() {