diff options
author | Florian Eckert <fe@dev.tdt.de> | 2021-11-30 16:01:14 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-03-19 16:13:58 +0100 |
commit | b9017384cae7bbc47186fdf35a80207844876a0d (patch) | |
tree | f845299df9f1931cf4d6acf19236e346176a582a /package/base-files | |
parent | b04d38a2eaa5604aa7216e0c02846d96dc2d317f (diff) | |
download | upstream-b9017384cae7bbc47186fdf35a80207844876a0d.tar.gz upstream-b9017384cae7bbc47186fdf35a80207844876a0d.tar.bz2 upstream-b9017384cae7bbc47186fdf35a80207844876a0d.zip |
procd: move service command to procd
The service command belongs to the procd and does not belong in the
shinit. In the course of the move, the script was also checked with
shellcheck and cleaned up.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/files/etc/shinit | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/package/base-files/files/etc/shinit b/package/base-files/files/etc/shinit index 6b682d8769..8df9771e65 100644 --- a/package/base-files/files/etc/shinit +++ b/package/base-files/files/etc/shinit @@ -8,26 +8,5 @@ alias ll='ls -alF --color=auto' [ -x /usr/bin/arp -o -x /sbin/arp ] || arp() { cat /proc/net/arp; } [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; } -service() { - if [ -f "/etc/init.d/$1" ]; then - /etc/init.d/$@ - else - echo "Usage: service <service> [command]" - if [ -n "$1" ]; then - echo "Service "'"'"$1"'"'" not found, the following services are available:" - else - echo "The following services are available:" - fi - for F in /etc/init.d/* ; do - printf "%-30s\t%10s\t%10s\n" "$F" \ - $( $($F enabled) && echo "enabled" || echo "disabled" ) \ - $( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename $F)' }" \ - | jsonfilter -q -e "@['$(basename $F)'].instances[*].running" | uniq)" = "true" ] \ - && echo "running" || echo "stopped" ) - done; - return 1 - fi -} - [ -n "$KSH_VERSION" -o \! -s "$HOME/.shinit" ] || . "$HOME/.shinit" [ -z "$KSH_VERSION" -o \! -s "$HOME/.mkshrc" ] || . "$HOME/.mkshrc" |