diff options
| author | Jeff Hatch <jhatch@multitech.com> | 2020-06-04 14:23:47 -0500 |
|---|---|---|
| committer | Jeff Hatch <jhatch@multitech.com> | 2020-06-04 14:23:47 -0500 |
| commit | 2fc1c8f4367fa674940f64927252fd6349a2d63b (patch) | |
| tree | eb08d052d64d0814ea1cfc75664b64be68eaffbb /recipes-core/busybox/files/ifplugd.init | |
| parent | e26f94e3f97b755652327f5652ea32f9ebf2b57b (diff) | |
| parent | e919ef1e33c2cb56856cdbd22792a3bc3f36341d (diff) | |
| download | meta-mlinux-atmel-2fc1c8f4367fa674940f64927252fd6349a2d63b.tar.gz meta-mlinux-atmel-2fc1c8f4367fa674940f64927252fd6349a2d63b.tar.bz2 meta-mlinux-atmel-2fc1c8f4367fa674940f64927252fd6349a2d63b.zip | |
Merge branch 'test-split' into 'master'
Test split
See merge request !1
Diffstat (limited to 'recipes-core/busybox/files/ifplugd.init')
| -rwxr-xr-x | recipes-core/busybox/files/ifplugd.init | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/recipes-core/busybox/files/ifplugd.init b/recipes-core/busybox/files/ifplugd.init deleted file mode 100755 index 418b088..0000000 --- a/recipes-core/busybox/files/ifplugd.init +++ /dev/null @@ -1,62 +0,0 @@ -#! /bin/bash -# -# ifplugd init.d script -[[ -x /usr/sbin/ifplugd ]] || exit 0 -[[ -r /etc/default/ifplugd ]] && . /etc/default/ifplugd - - -#Functions to do individual actions -startdaemon(){ - # Start the application - echo -n "Starting ifplugd: " - CONFS=($(find -L /etc/ifplugd -name '*.conf')) - ((i=0)) - logger -p daemon.info "Found ${#CONFS[@]} Configurations" - while ((i < ${#CONFS[@]})) ; do - unset ARGS INTERFACE - . ${CONFS[$i]} - logger -p daemon.info "Starting Interface ${INTERFACE}" - ((i++)) - /usr/sbin/start-stop-daemon -Svp /run/ifplugd.${INTERFACE}.pid -a /usr/sbin/ifplugd -- ${ARGS} - done - if ((${#CONFS[@]} == 0)) ; then - /usr/sbin/start-stop-daemon -n ifplugd -Sv -x /usr/sbin/ifplugd -- ${ARGS} - fi - echo "done" -} -stopdaemon(){ - echo -n "Stopping ifplugd: " - PIDS=($(find /run -xdev -name 'ifplugd.*.pid')) - ((i=0)) - while ((i < ${#PIDS[@]})) ; do - PF=${PIDS[$i]} - [[ $PF =~ /ifplugd\.([^.]*)\.pid ]] - IF=${BASH_REMATCH[1]} - logger -p user.info "Shutting down interface $IF" - /usr/sbin/start-stop-daemon -n ifplugd -Kqp $PF - ((i++)) - done - echo "done" -} - -case "$1" in - start) - [[ ${ENABLED} == "yes" ]] || exit 0 - startdaemon - ;; - stop) - stopdaemon - ;; - restart|force-reload) - stopdaemon - sleep 2 - startdaemon - ;; - *) - echo "Usage: /etc/init.d/ifplugd { start | stop | restart | force-reload }" >&2 - exit 1 - ;; -esac - -exit 0 - |
