/init.d/ifupdown-scripts-zg2
http://github.com/brinkman83/bashrc · Shell · 34 lines · 19 code · 5 blank · 10 comment · 2 complexity · d148776b24f23ce65e03eba7dca5bc3b MD5 · raw file
- #!/bin/sh
- set -e
- STATEDIR="/etc/network/run/ifupdown-scripts-zg2"
- ### BEGIN INIT INFO
- # Provides: ifupdown-scripts-zg2
- # Required-Start: checkroot
- # Required-Stop:
- # X-Start-Before: ifupdown networking
- # Default-Start: S
- # Default-Stop:
- # Short-Description: clean ifupdown-scripts-zg2 state files
- ### END INIT INFO
- if [ -r "/lib/lsb/init-functions" ]; then
- . /lib/lsb/init-functions
- else
- echo "E: /lib/lsb/init-functions not found, lsb-base (>= 3.0-6) needed"
- exit 1
- fi
- case "$1" in
- start|restart)
- if [ -e $STATEDIR ]; then
- log_begin_msg -n "Cleaning: $STATEDIR"
- rm -f $STATEDIR/*
- log_end_msg 0
- fi
- ;;
- stop|reload|force-reload)
- ;;
- esac