Magellan Linux

Contents of /tags/init-0_3_3-r4/magellan-initscripts/etc/rc.d/init.d/localnet

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54 - (show annotations) (download)
Mon Feb 14 22:27:37 2005 UTC (19 years, 2 months ago) by (unknown author)
File size: 821 byte(s)
This commit was manufactured by cvs2svn to create tag
'init-0_3_3-r4'.
1 #!/bin/bash
2
3 #%rlevels: 7:s 0:k 6:k
4 #%start: 80
5 #%stop: 90
6
7 #deps
8 #%needs:
9 #%before:
10 #%after:
11
12 source /etc/sysconfig/rc
13 source $rc_functions
14
15 #get hostname
16 HOSTNAME="$(< /etc/hostname)"
17
18 case "$1" in
19 start)
20 echo -e ${COLOREDSTAR}"Bringing up the loopback interface ..."
21 loadproc ifconfig lo 127.0.0.1
22
23 echo -e ${COLOREDSTAR}"Setting hostname to ${HOSTNAME} ..."
24 loadproc hostname ${HOSTNAME}
25
26 update_svcstatus $1
27 splash svc_started "$(basename $0)" 0
28 ;;
29
30 stop)
31 echo -e ${COLOREDSTAR}"Bringing down the loopback interface ..."
32 loadproc ifconfig lo down
33
34 update_svcstatus $1
35 splash svc_stopped "$(basename $0)" 0
36 ;;
37
38 restart)
39 $0 stop
40 sleep 1
41 $0 start
42 ;;
43
44 status)
45 echo "Hostname is: $(hostname)"
46 ifconfig lo
47 ;;
48
49 *)
50 echo "Usage: $0 {start|stop|restart|status}"
51 exit 1
52 ;;
53 esac

Properties

Name Value
svn:executable *