diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2017-03-21 17:19:32 +0100 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2017-03-22 14:42:25 +0100 |
commit | 9ab04edfb16c30f9bb03b1227b60cc751a692876 (patch) | |
tree | 3e6fc4fc204e30a341d78286e0b3c8010802e13a /sysconfig/network-scripts | |
parent | 0649ea591e8d95415847da3ceeb4c2ba49d01248 (diff) | |
download | initscripts-9ab04edfb16c30f9bb03b1227b60cc751a692876.tar initscripts-9ab04edfb16c30f9bb03b1227b60cc751a692876.tar.gz initscripts-9ab04edfb16c30f9bb03b1227b60cc751a692876.tar.bz2 initscripts-9ab04edfb16c30f9bb03b1227b60cc751a692876.tar.xz initscripts-9ab04edfb16c30f9bb03b1227b60cc751a692876.zip |
9.70-sync: sysconfig/network-scripts/* updated - part 1
This commit contains only whitespace & indentation style changes.
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-x | sysconfig/network-scripts/ifdown-bnep | 34 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-bnep | 46 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-ctc | 25 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-plip | 13 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-tunnel | 38 |
5 files changed, 77 insertions, 79 deletions
diff --git a/sysconfig/network-scripts/ifdown-bnep b/sysconfig/network-scripts/ifdown-bnep index b8064fd8..f29b34b6 100755 --- a/sysconfig/network-scripts/ifdown-bnep +++ b/sysconfig/network-scripts/ifdown-bnep @@ -13,37 +13,37 @@ source_config # On hotplug events, just bring the virtual device up as if it's normal Ethernet if [ -n "$IN_HOTPLUG" ]; then - exec /etc/sysconfig/network-scripts/ifdown-eth ${CONFIG} $2 + exec /etc/sysconfig/network-scripts/ifdown-eth ${CONFIG} $2 fi stop_panu() { - kill -TERM $(cat /var/run/pand-${DEVICE}.pid) + kill -TERM $(cat /var/run/pand-${DEVICE}.pid) } stop_nap() { - kill -TERM $(cat /var/run/pand-${DEVICE}.pid) - /usr/bin/pand -K + kill -TERM $(cat /var/run/pand-${DEVICE}.pid) + /usr/bin/pand -K } stop_gn() { - : + : } case "$ROLE" in - PANU) - stop_panu - ;; - NAP) - stop_nap - ;; - GN) - stop_gn - ;; - *) - echo Unknown BNEP mode :$ROLE - ;; +PANU) + stop_panu + ;; +NAP) + stop_nap + ;; +GN) + stop_gn + ;; +*) + echo Unknown BNEP mode :$ROLE + ;; esac diff --git a/sysconfig/network-scripts/ifup-bnep b/sysconfig/network-scripts/ifup-bnep index 5aff2777..bc696625 100755 --- a/sysconfig/network-scripts/ifup-bnep +++ b/sysconfig/network-scripts/ifup-bnep @@ -13,43 +13,43 @@ source_config # On hotplug events, just bring the virtual device up as if it's normal Ethernet if [ -n "$IN_HOTPLUG" ]; then - exec sh -x /etc/sysconfig/network-scripts/ifup-eth ${CONFIG} $2 + exec sh -x /etc/sysconfig/network-scripts/ifup-eth ${CONFIG} $2 fi start_panu() { - PANDARGS="--persist --pidfile=/var/run/pand-${DEVICE}.pid --ethernet=${DEVICE} --autozap" - [ "${CACHE}" != "no" -a "${CACHE}" != "NO" ] && PANDARGS="${PANDARGS} --cache" - if [ "${REMOTEBDADDR}" = "" ]; then - PANDARGS="${PANDARGS} --search" - else - PANDARGS="${PANDARGS} --connect ${REMOTEBDADDR}" - fi - /usr/bin/pand ${PANDARGS} + PANDARGS="--persist --pidfile=/var/run/pand-${DEVICE}.pid --ethernet=${DEVICE} --autozap" + [ "${CACHE}" != "no" -a "${CACHE}" != "NO" ] && PANDARGS="${PANDARGS} --cache" + if [ "${REMOTEBDADDR}" = "" ]; then + PANDARGS="${PANDARGS} --search" + else + PANDARGS="${PANDARGS} --connect ${REMOTEBDADDR}" + fi + /usr/bin/pand ${PANDARGS} } start_nap() { - : + : } start_gn() { - : + : } case "$ROLE" in - PANU) - start_panu - ;; - NAP) - start_nap - ;; - GN) - start_gn - ;; - *) - echo Unknown BNEP mode :$ROLE - ;; +PANU) + start_panu + ;; +NAP) + start_nap + ;; +GN) + start_gn + ;; +*) + echo Unknown BNEP mode :$ROLE + ;; esac diff --git a/sysconfig/network-scripts/ifup-ctc b/sysconfig/network-scripts/ifup-ctc index 39d6a09c..83f754a0 100755 --- a/sysconfig/network-scripts/ifup-ctc +++ b/sysconfig/network-scripts/ifup-ctc @@ -19,9 +19,8 @@ CONFIG=$1 [ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG source_config -if [ "$2" = "boot" -a "${ONBOOT}" = "no" ] -then - exit +if [ "$2" = "boot" -a "${ONBOOT}" = "no" ] ; then + exit fi [ -n "${MTU}" ] && ip link set dev ${DEVICE} mtu ${MTU} @@ -32,22 +31,22 @@ ip link set up dev ${DEVICE} # quite a while... timeout=0 while ! ping -w 30 -c 1 ${GATEWAY} &>/dev/null; do - timeout=$(($timeout + 1)) - if [ $timeout = 20 ]; then - net_log $"ERROR: ${DEVICE} did not come up!" - break - fi + timeout=$(($timeout + 1)) + if [ $timeout = 20 ]; then + net_log $"ERROR: ${DEVICE} did not come up!" + break + fi done if [ "${NETWORK}" != "" ] ; then - ip route add to ${GATEWAY} metric 1 dev ${DEVICE} + ip route add to ${GATEWAY} metric 1 dev ${DEVICE} fi if [ "${GATEWAY}" != "" ]; then - if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then - # set up default gateway - ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY} - fi + if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then + # set up default gateway + ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY} + fi fi /etc/sysconfig/network-scripts/ifup-post $1 diff --git a/sysconfig/network-scripts/ifup-plip b/sysconfig/network-scripts/ifup-plip index c3b9efa1..2cea68b4 100755 --- a/sysconfig/network-scripts/ifup-plip +++ b/sysconfig/network-scripts/ifup-plip @@ -6,9 +6,8 @@ cd /etc/sysconfig/network-scripts CONFIG=$1 source_config -if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ] -then - exit +if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ]; then + exit fi [ -z "$PREFIX" ] && eval $(/bin/ipcalc --prefix ${IPADDR} ${NETMASK}) @@ -19,10 +18,10 @@ ip route add ${NETWORK} dev ${DEVICE} . /etc/sysconfig/network if [ "${GATEWAY}" != "" ]; then - if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then - # set up default gateway - ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY} - fi + if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then + # set up default gateway + ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY} + fi fi /etc/sysconfig/network-scripts/ifup-post $1 diff --git a/sysconfig/network-scripts/ifup-tunnel b/sysconfig/network-scripts/ifup-tunnel index af54a72e..5a1df54c 100755 --- a/sysconfig/network-scripts/ifup-tunnel +++ b/sysconfig/network-scripts/ifup-tunnel @@ -37,25 +37,25 @@ if [ "$PEER_OUTER_IPADDR" = "$PEER_INNER_IPADDR" ]; then fi case "$TYPE" in - GRE) - MODE=gre - proto=-4 - /sbin/modprobe ip_gre - ;; - IPIP) - MODE=ipip - proto=-4 - /sbin/modprobe ipip - ;; - IPIP6) - MODE=ipip6 - proto=-6 - /sbin/modprobe ip6_tunnel - ;; - *) - net_log $"Invalid tunnel type $TYPE" - exit 1 - ;; +GRE) + MODE=gre + proto=-4 + /sbin/modprobe ip_gre + ;; +IPIP) + MODE=ipip + proto=-4 + /sbin/modprobe ipip + ;; +IPIP6) + MODE=ipip6 + proto=-6 + /sbin/modprobe ip6_tunnel + ;; +*) + net_log $"Invalid tunnel type $TYPE" + exit 1 + ;; esac # Generic tunnel devices are not supported here |