diff options
author | Jan Macku <jamacku@redhat.com> | 2019-09-12 12:32:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-12 12:32:36 +0200 |
commit | 66d26269a83229b7340f7ace06dfc715c04df7d8 (patch) | |
tree | d25afcbba9d13d50f62fe8177ab4863c0c220c47 /etc/rc.d | |
parent | dd703a8494647d401dbffa0f036233e08044ec60 (diff) | |
download | initscripts-66d26269a83229b7340f7ace06dfc715c04df7d8.tar initscripts-66d26269a83229b7340f7ace06dfc715c04df7d8.tar.gz initscripts-66d26269a83229b7340f7ace06dfc715c04df7d8.tar.bz2 initscripts-66d26269a83229b7340f7ace06dfc715c04df7d8.tar.xz initscripts-66d26269a83229b7340f7ace06dfc715c04df7d8.zip |
Repalace hardcoded tests for yes and no with testing functions
Resolve issue: #42
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-x | etc/rc.d/init.d/network | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network index e3560b64..414bee06 100755 --- a/etc/rc.d/init.d/network +++ b/etc/rc.d/init.d/network @@ -28,7 +28,7 @@ fi # Check that networking is up. -[ "${NETWORKING}" = "no" ] && exit 6 +is_false "${NETWORKING}" && exit 6 # if the ip configuration utility isn't around we can't function. [ -x /sbin/ip ] || exit 1 @@ -76,13 +76,11 @@ start) # bring up loopback interface action $"Bringing up loopback interface: " ./ifup ifcfg-lo - case "$VLAN" in - yes) + if is_true "$VLAN" ; then if [ ! -d /proc/net/vlan ] && ! modprobe 8021q >/dev/null 2>&1 ; then net_log $"No 802.1Q VLAN support available in kernel." fi - ;; - esac + fi vlaninterfaces="" vpninterfaces="" @@ -99,7 +97,7 @@ start) if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi - if [ "$SLAVE" = "yes" ] && ( ! is_nm_running || is_false $NM_CONTROLLED ) ; then + if is_true "$SLAVE" && ( ! is_nm_running || is_false "$NM_CONTROLLED" ) ; then continue fi |