From 43ebe1cf2ba3296ee0c9a4b353f548be30801909 Mon Sep 17 00:00:00 2001 From: "David Kaspar [Dee'Kej]" Date: Sat, 29 Oct 2016 14:47:04 +0200 Subject: ifup-post: use is_false() function instead of checking for "no" string --- sysconfig/network-scripts/ifup-post | 7 +++++-- 1 file 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 -- cgit v1.2.1