summaryrefslogtreecommitdiff
path: root/openwrt/rhctl/files/switchctl.init
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2018-11-07 11:01:29 (GMT)
committerChristian Pointner <equinox@helsinki.at>2018-11-07 11:01:29 (GMT)
commitfb90864a19f2b834ce8ba5773dc0a6aed9e0f11e (patch)
treedc91519fd928d6bb30bc57961aedb883aa941fb3 /openwrt/rhctl/files/switchctl.init
parent6c552b607e8c1a175ae26e90b9637836dc571ee9 (diff)
updated openwrt packaging
Diffstat (limited to 'openwrt/rhctl/files/switchctl.init')
-rwxr-xr-xopenwrt/rhctl/files/switchctl.init56
1 files changed, 0 insertions, 56 deletions
diff --git a/openwrt/rhctl/files/switchctl.init b/openwrt/rhctl/files/switchctl.init
deleted file mode 100755
index 24ed62f..0000000
--- a/openwrt/rhctl/files/switchctl.init
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh /etc/rc.common
-START=70
-
-BIN=switchctl
-DAEMON=/usr/bin/$BIN
-DESC=$BIN
-RUN_D=/var/run/rhctl
-PIDFILE=$RUN_D/$BIN.pid
-
-
-option_cb() {
- local varname="$1"
- local value="$2"
-
- if ! echo "$CONFIG_OPTIONS" | grep " $varname " > /dev/null; then
- CONFIG_OPTIONS="$CONFIG_OPTIONS $varname "
- fi
-}
-
-start_daemon() {
- local option
- local value
- local args=""
-
- for option in $CONFIG_OPTIONS
- do
- config_get value "$1" "$option"
- option=`echo $option | tr '_' '-'`
- if [ -n "$value" ]; then
- args="$args --$option $value"
- fi
- done
- local status="OK"
- $DAEMON --write-pid $PIDFILE $args || status="failed"
- echo -n " ($status)"
-}
-
-start() {
- echo -n "Starting $DESC:"
- config_load "rhctl"
- mkdir -p $RUN_D
- config_foreach start_daemon "switchctl"
- echo "."
-}
-
-stop() {
- echo -n "Stopping $DESC:"
- if [ -f $PIDFILE ]; then
- kill `cat $PIDFILE` > /dev/null 2>&1
- rm -f $PIDFILE > /dev/null 2>&1
- echo -n " (Ok)"
- else
- echo -n " (not running)"
- fi
- echo "."
-}