PageRenderTime 33ms CodeModel.GetById 30ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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
 1#!/bin/sh
 2
 3set -e
 4
 5STATEDIR="/etc/network/run/ifupdown-scripts-zg2"
 6
 7### BEGIN INIT INFO
 8# Provides:          ifupdown-scripts-zg2
 9# Required-Start:    checkroot
10# Required-Stop:     
11# X-Start-Before:    ifupdown networking
12# Default-Start:     S
13# Default-Stop:      
14# Short-Description: clean ifupdown-scripts-zg2 state files
15### END INIT INFO
16
17if [ -r "/lib/lsb/init-functions" ]; then
18  . /lib/lsb/init-functions
19else
20  echo "E: /lib/lsb/init-functions not found, lsb-base (>= 3.0-6) needed"
21  exit 1
22fi
23
24case "$1" in
25	start|restart)
26		if [ -e $STATEDIR ]; then
27			log_begin_msg -n "Cleaning: $STATEDIR"
28			rm -f $STATEDIR/*
29			log_end_msg 0
30		fi
31		;;
32	stop|reload|force-reload)
33		;;
34esac