# - spoofig protection,
# - icmp echo ignore broadcasts,
# - setup lo interface
-network_init()
-{
+network_init() {
if [ ! -x /sbin/ip ]; then
nls "%s is missing. Can't continue." "/sbin/ip"
exit 1
fi
}
-network_postinit()
-{
+network_postinit() {
# Set static RARP table
static_rarp
######
# deinitialize networking
# - down lo interface.
-network_deinit()
-{
+network_deinit() {
setup_routes off
setup_ip_rules off
if [ -n "$bootprio" ]; then
# find all the interfaces besides loopback.
- interfaces_boot=`
+ interfaces_boot=$(
for a in $(echo "$bootprio" | sort -t= -n -k2,2); do
i="${a%:BOOTPRIO*}"
case $i in
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
done
- `
+ )
else
- interfaces_boot=`
+ interfaces_boot=$(
for i in $ifcfg_files; do
case ${i##*/} in
ifcfg-lo|ifcfg-sit*|ifcfg-atm*|ifcfg-lec*|ifcfg-nas*|ifcfg-br*|ifcfg-*.*) continue ;;
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
done
- `
+ )
- interfaces_vlan_boot=`
+ interfaces_vlan_boot=$(
for i in $ifcfg_files; do
case ${i##*/} in
ifcfg-*.*) ;;
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
done
- `
+ )
- interfaces_br_boot=`
+ interfaces_br_boot=$(
for i in $ifcfg_files; do
case ${i##*/} in
ifcfg-br*) ;;
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
done
- `
+ )
- interfaces_sit_boot=`
+ interfaces_sit_boot=$(
for i in $ifcfg_files; do
case ${i##*/} in
ifcfg-sit*) ;;
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/ifcfg-}"
done
- `
+ )
fi
- tunnels=`
+ tunnels=$(
for i in $(network_interface_configs 'tnlcfg-*'); do
ONBOOT=""; . "$i" 2>/dev/null
[ ${ONBOOT:-no} = yes ] && echo "${i##*/tnlcfg-}"
done
- `
+ )
}
start() {