5
5
# Starts/Stops DECnet processes
7
# This script should go in /etc/init.d (Debian)
8
# /etc/rc.d/init.d (RedHat)
11
# and you should link to it from the relevant runlevel startup directory
13
# update-rc.d start 39 S . stop 11 1 .
16
# ln -s /etc/rc.d/init.d/decnet /etc/rc.d/rc3.d/S09decnet
19
# ln -s /sbin/init.d/decnet.sh /sbin/init.d/rc2.d/S05decnet
22
# ln -s /etc/rc.d/init.d/decnet /etc/rc.d/rc5.d/S01decnet
24
# This script MUST be run before TCP/IP is started unless you have a DEC
25
# TULIP based ethernet card AND are running Linux 2.2
10
# config: /etc/decnet.conf
13
# This script should go in
14
# /etc/init.d for redhat 7.0 onwards
15
# /etc/rc.d/init.d for redhat up to 6.2
17
# You can install it using the following command:
19
# chkconfig --level 345 decnet on
27
21
# -----------------------------------------------------------------------------
29
23
# Daemons to start. You may remove the ones you don't want
25
daemons="dnetd phoned"
27
# Prefix for where the progs are installed. "make install" puts them
28
# in /usr/local, the RPM has them in /usr
32
daemons="dnetd phoned"
35
# Interfaces to set the MAC address of. If empty all available
36
# ethernet interfaces will have their MAC address set the the DECnet
37
# address. If you do not want to do that (or don't want to do it here)
38
# then remove the -hw switch from the command.
40
# If running on Caldera OpenLinux you may need to add the -f switch to
41
# startnet to force it to change the MAC address because that
42
# distribution's startup scripts UP all the interfaces before calling any
47
startnet="$prefix/sbin/startnet -hw $interfaces"
50
# See which distribution we are using and customise the start/stop
51
# commands and the console display.
53
if [ -d /var/lib/dpkg ]
56
startcmd="start-stop-daemon --start --quiet --exec"
57
stopcmd="start-stop-daemon --stop --quiet --exec"
61
elif [ -d /var/lib/YaST ]
66
stopcmd="killproc -TERM"
71
. /etc/rc.d/init.d/functions
32
# Interfaces to set the MAC address of. By default only the default interface
33
# in /etc/decnet.conf will be set. If you want to set up more interfaces
34
# for DECnet than add them here.
39
# Set up some variables.
41
. /etc/rc.d/init.d/functions
97
echo -n "Starting DECnet: "
66
echo -n "Starting DECnet: "
99
# Run startnet only if we need to
100
EXEC=`cat /proc/net/decnet | sed -n '2s/ *\([0-9]\.[0-9]\).*[0-9]\.[0-9]/\1/p'`
101
if [ -z "$EXEC" -o "$EXEC" = "0.0" ]
106
echo error starting socket layer.
68
NODE=`grep executor /etc/decnet.conf| awk '{print $2}'`
69
echo "$NODE" > /proc/sys/net/decnet/node_address
70
CCT=`grep executor /etc/decnet.conf | awk '{print $6}'`
71
echo "$CCT" > /proc/sys/net/decnet/default_device
72
$prefix/sbin/setether $NODE $CCT $extra_interfaces