procd: move service command to procd
[openwrt/staging/wigyori.git] / package / base-files / files / etc / shinit
index 6b682d8769dfa78200bdc980fa746fe5f5bd204d..8df9771e6564b8581867430e7d56225f6c9ab20c 100644 (file)
@@ -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"