]> git.pld-linux.org Git - projects/rc-scripts.git/blobdiff - rc.d/init.d/network
- unified function definitions (line-saving way),
[projects/rc-scripts.git] / rc.d / init.d / network
index 658a5caabc990790b262764cb161350212e10175..33ebb8f8c1761dbe608a0bb1fc783a7e90d720f6 100644 (file)
@@ -38,8 +38,7 @@ fi
 #   - 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
@@ -87,8 +86,7 @@ network_init()
        fi
 }
 
-network_postinit()
-{
+network_postinit() {
        # Set static RARP table
        static_rarp
 
@@ -99,8 +97,7 @@ network_postinit()
 ######
 # deinitialize networking
 # - down lo interface.
-network_deinit()
-{
+network_deinit() {
        setup_routes off
        setup_ip_rules off
 
@@ -132,7 +129,7 @@ find_boot_interfaces() {
 
        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
@@ -141,9 +138,9 @@ find_boot_interfaces() {
                                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 ;;
@@ -151,9 +148,9 @@ find_boot_interfaces() {
                                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-*.*) ;;
@@ -162,9 +159,9 @@ find_boot_interfaces() {
                                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*) ;;
@@ -173,9 +170,9 @@ find_boot_interfaces() {
                                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*) ;;
@@ -184,15 +181,15 @@ find_boot_interfaces() {
                                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() {
This page took 0.063269 seconds and 4 git commands to generate.