clfs-1.2
clfs-2.1
clfs-3.0.0-systemd
clfs-3.0.0-sysvinit
systemd
sysvinit
Last change
on this file since 4232f0e was d66bf46, checked in by Jim Gifford <clfs@…>, 18 years ago |
Update bootscripts to follow our standards
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | ########################################################################
|
---|
3 | # Begin $rc_base/init.d/network
|
---|
4 | #
|
---|
5 | # Description : Network Control Script
|
---|
6 | #
|
---|
7 | # Authors : Gerard Beekmans - gerard@linuxfromscratch.org
|
---|
8 | # Nathan Coulson - nathan@linuxfromscratch.org
|
---|
9 | # Kevin P. Fleming - kpfleming@linuxfromscratch.org
|
---|
10 | #
|
---|
11 | # Version : 00.00
|
---|
12 | #
|
---|
13 | # Notes :
|
---|
14 | #
|
---|
15 | ########################################################################
|
---|
16 |
|
---|
17 | . /etc/sysconfig/rc
|
---|
18 | . ${rc_functions}
|
---|
19 | . /etc/sysconfig/network
|
---|
20 |
|
---|
21 | case "${1}" in
|
---|
22 | start)
|
---|
23 | # Start all network interfaces
|
---|
24 | for file in ${network_devices}/ifconfig.*
|
---|
25 | do
|
---|
26 | interface=${file##*/ifconfig.}
|
---|
27 |
|
---|
28 | # skip if $file is * (because nothing was found)
|
---|
29 | if [ "${interface}" = "*" ]
|
---|
30 | then
|
---|
31 | continue
|
---|
32 | fi
|
---|
33 |
|
---|
34 | IN_BOOT=1 ${network_devices}/ifup ${interface}
|
---|
35 | done
|
---|
36 | ;;
|
---|
37 |
|
---|
38 | stop)
|
---|
39 | # Reverse list
|
---|
40 | FILES=""
|
---|
41 | for file in ${network_devices}/ifconfig.*
|
---|
42 | do
|
---|
43 | FILES="${file} ${FILES}"
|
---|
44 | done
|
---|
45 |
|
---|
46 | # Stop all network interfaces
|
---|
47 | for file in ${FILES}
|
---|
48 | do
|
---|
49 | interface=${file##*/ifconfig.}
|
---|
50 |
|
---|
51 | # skip if $file is * (because nothing was found)
|
---|
52 | if [ "${interface}" = "*" ]
|
---|
53 | then
|
---|
54 | continue
|
---|
55 | fi
|
---|
56 |
|
---|
57 | IN_BOOT=1 ${network_devices}/ifdown ${interface}
|
---|
58 | done
|
---|
59 | ;;
|
---|
60 |
|
---|
61 | restart)
|
---|
62 | ${0} stop
|
---|
63 | sleep 1
|
---|
64 | ${0} start
|
---|
65 | ;;
|
---|
66 |
|
---|
67 | *)
|
---|
68 | echo "Usage: ${0} {start|stop|restart}"
|
---|
69 | exit 1
|
---|
70 | ;;
|
---|
71 | esac
|
---|
72 |
|
---|
73 | # End /etc/rc.d/init.d/network
|
---|
Note:
See
TracBrowser
for help on using the repository browser.