diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2016-10-29 14:47:04 +0200 |
---|---|---|
committer | Lukáš Nykrýn <lnykryn@redhat.com> | 2016-10-31 15:35:50 +0100 |
commit | 43ebe1cf2ba3296ee0c9a4b353f548be30801909 (patch) | |
tree | e15e1c09d4b642e60f084929a5101097108ec8c2 /sysconfig/network-scripts/ifup-post | |
parent | 6a593a24130421689ea8056626cb2bb07d89d947 (diff) | |
download | initscripts-43ebe1cf2ba3296ee0c9a4b353f548be30801909.tar initscripts-43ebe1cf2ba3296ee0c9a4b353f548be30801909.tar.gz initscripts-43ebe1cf2ba3296ee0c9a4b353f548be30801909.tar.bz2 initscripts-43ebe1cf2ba3296ee0c9a4b353f548be30801909.tar.xz initscripts-43ebe1cf2ba3296ee0c9a4b353f548be30801909.zip |
ifup-post: use is_false() function instead of checking for "no" string
Diffstat (limited to 'sysconfig/network-scripts/ifup-post')
-rwxr-xr-x | sysconfig/network-scripts/ifup-post | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup-post b/sysconfig/network-scripts/ifup-post index 8685da37..9b1e3ac9 100755 --- a/sysconfig/network-scripts/ifup-post +++ b/sysconfig/network-scripts/ifup-post @@ -1,5 +1,8 @@ #!/bin/bash +# Source the general functions for is_true() and is_false(): +. /etc/init.d/functions + cd /etc/sysconfig/network-scripts . ./network-functions @@ -16,14 +19,14 @@ source_config [ -z "$REALDEVICE" ] && REALDEVICE=$DEVICE -if [ "$ISALIAS" = no ] ; then +if is_false "$ISALIAS"; then /etc/sysconfig/network-scripts/ifup-aliases ${DEVICE} ${CONFIG} fi /etc/sysconfig/network-scripts/ifup-routes ${REALDEVICE} ${DEVNAME} -if [ "$PEERDNS" != "no" ] ||[ -n "$RESOLV_MODS" -a "$RESOLV_MODS" != "no" ]; then +if ! is_false "$PEERDNS" || [ -n "$RESOLV_MODS" ] && ! is_false "$RESOLV_MODS"; then [ -n "$MS_DNS1" ] && DNS1=$MS_DNS1 [ -n "$MS_DNS2" ] && DNS2=$MS_DNS2 |