Annotation of /trunk/magellan-initscripts/rc/localnet
Parent Directory | Revision Log
Revision 49 -
(hide annotations)
(download)
Mon Feb 14 22:26:22 2005 UTC (19 years, 7 months ago) by niro
Original Path: trunk/magellan-initscripts/etc/rc.d/init.d/localnet
File size: 821 byte(s)
Mon Feb 14 22:26:22 2005 UTC (19 years, 7 months ago) by niro
Original Path: trunk/magellan-initscripts/etc/rc.d/init.d/localnet
File size: 821 byte(s)
hostname isn't a var anymore; using a file directly
1 | niro | 2 | #!/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 | niro | 49 | #get hostname |
16 | HOSTNAME="$(< /etc/hostname)" | ||
17 | |||
18 | niro | 2 | case "$1" in |
19 | start) | ||
20 | echo -e ${COLOREDSTAR}"Bringing up the loopback interface ..." | ||
21 | loadproc ifconfig lo 127.0.0.1 | ||
22 | |||
23 | niro | 49 | echo -e ${COLOREDSTAR}"Setting hostname to ${HOSTNAME} ..." |
24 | loadproc hostname ${HOSTNAME} | ||
25 | niro | 2 | |
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 | * |