File: init.d

package info (click to toggle)
frad 0.20-2
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 212 kB
  • ctags: 151
  • sloc: ansic: 1,272; sh: 85; makefile: 54
file content (57 lines) | stat: -rw-r--r-- 1,468 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! /bin/sh
#
# This file was automatically customized by debmake on Tue, 27 Jan 1998 17:06:28 -0800
#
# Written by Miquel van Smoorenburg <miquels@drinkel.ow.org>.
# Modified for Debian GNU/Linux by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Modified for Debian by Christoph Lameter <clameter@debian.org>

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/frad
# The following value is extracted by debstd to figure out how to generate
# the postinst script. Edit the field to change the way the script is
# registered through update-rc.d (see the manpage for update-rc.d!)
FLAGS="defaults 14"

test -f $DAEMON || exit 0

case "$1" in
  start)
	echo -n "Starting Frame Relay Device:"
#	insmod dlci
#	indmod sdla
	frad -Q /etc/frad.conf
	dlcicfg -Q file /etc/frad.conf
	ifconfig sdla0 up
#	ifconfig dlci00 route-cap pointopoint cap-T1-ilc netmask 255.255.255.128 up
#	ifconfig dlci01 route-cap pointopoint cap-T1-ilc netmask 255.255.255.128 up
#	route add cap-t1-ilc dev dlci00
#	route add default dev dlci01 source linux.org
#	route add default dev dlci00

	touch /var/run/frad
	echo "frad"
    ;;
  stop)
	echo -n "Stopping Frame Relay Device:"
	ifconfig sdla0 down
#	route del default
#	route del cap-T1-ilc
	ifconfig sdla0 down
#	ifconfig dlci00 down
#	ifconfig dlci01 down
#	dlcicfg del dlci00
#	dlcicfg del dlci01
#	rmmod sdla
#	rmmod dlci

	rm /var/run/frad
	echo "frad"
    ;;
  *)
    echo "Usage: /etc/init.d/frad {start|stop}"
    exit 1
    ;;
esac

exit 0