]>
git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/system/network
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
24 eval $
(/usr
/local
/bin
/readhash
/var
/ipfire
/ethernet
/settings
)
29 if [ -n "${1}" ]; then
31 for i
in green red blue orange
; do
36 for i
in green red blue orange
; do
41 while [ ! $# = 0 ]; do
42 for i
in green red blue orange
; do
43 if [ "${i}" == "${1}" ]; then
52 # Starting interfaces...
54 [ "$green" == "1" ] && /etc
/rc.d
/init.d
/networking
/green start
57 [ "$blue" == "1" ] && [ "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "4" ] && \
58 /etc
/rc.d
/init.d
/networking
/blue start
61 [ "$orange" == "1" ] && [ "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "4" ] && \
62 /etc
/rc.d
/init.d
/networking
/orange start
65 [ "$red" == "1" ] && /etc
/rc.d
/init.d
/networking
/red start
67 # Create IPsec interfaces
68 /usr
/local
/bin
/ipsec-interfaces
70 /etc
/rc.d
/init.d
/static-routes start
72 boot_mesg
"Mounting network file systems..."
78 boot_mesg
"Umounting network file systems..."
82 # Stopping interfaces...
84 [ "$green" == "1" ] && /etc
/rc.d
/init.d
/networking
/green stop
87 [ "$blue" == "1" ] && [ "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "4" ] && \
88 /etc
/rc.d
/init.d
/networking
/blue stop
91 [ "$orange" == "1" ] && [ "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "4" ] && \
92 /etc
/rc.d
/init.d
/networking
/orange stop
95 if [ "$red" == "1" ]; then
96 if [ "$CONFIG_TYPE" = "1" -o "$CONFIG_TYPE" = "2" -o "$CONFIG_TYPE" = "3" -o "$CONFIG_TYPE" = "4" ]; then
97 /etc
/rc.d
/init.d
/networking
/red stop
105 for i
in green red blue orange
; do
106 if [ "${!i}" == "1" ]; then
116 echo "Usage: ${0} {start|stop|restart} [device(s)]"