Magellan Linux

Annotation of /trunk/magellan-initscripts/etc/rc.d/init.d/localnet

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:executable *