File: ifupdown-scripts-zg2.init.d

package info (click to toggle)
ifupdown-scripts-zg2 0.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 500 kB
  • ctags: 76
  • sloc: sh: 3,606; makefile: 35
file content (34 lines) | stat: -rwxr-xr-x 697 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

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