aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/etc/rc.common11
1 files changed, 10 insertions, 1 deletions
diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common
index 37adab0c54..d3fa3be505 100755
--- a/package/base-files/files/etc/rc.common
+++ b/package/base-files/files/etc/rc.common
@@ -105,9 +105,10 @@ ${INIT_TRACE:+set -x}
. "$initscript"
[ -n "$USE_PROCD" ] && {
- EXTRA_COMMANDS="${EXTRA_COMMANDS} running trace"
+ EXTRA_COMMANDS="${EXTRA_COMMANDS} running status trace"
EXTRA_HELP="\
running Check if service is running
+ status Service status
"
. $IPKG_INSTROOT/lib/functions/procd.sh
@@ -153,6 +154,14 @@ ${INIT_TRACE:+set -x}
running() {
service_running "$@"
}
+
+ status() {
+ if eval "type status_service" 2>/dev/null >/dev/null; then
+ status_service "$@"
+ else
+ _procd_status "$(basename ${basescript:-$initscript})" "$1"
+ fi
+ }
}
ALL_COMMANDS="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"