diff options
author | Frederik "Freso" S. Olesen | 2012-09-27 21:35:12 +0200 |
---|---|---|
committer | Frederik “Freso” S. Olesen | 2012-09-27 21:35:12 +0200 |
commit | 4e70e00f2e63ea4abc97d33d1cdd5312163196ba (patch) | |
tree | ec875844b7b184d89a2f4b88e74f40cac9d189f3 /00-pdnsd | |
parent | ffe76cfc1fb5b95f9069479e1217d10b69b839a9 (diff) | |
download | aur-4e70e00f2e63ea4abc97d33d1cdd5312163196ba.tar.gz |
networkmanager-dispatcher-pdnsd: Improve/harden test/[ calls a bit.
See also:
- http://mywiki.wooledge.org/BashPitfalls#A.5B_.24foo_.3D_.22bar.22_.5D
Diffstat (limited to '00-pdnsd')
-rwxr-xr-x | 00-pdnsd | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -19,7 +19,7 @@ pdnsd_is_running() { return $? ;; 'init') - [ `rc.d list|grep pdnsd|cut -f1 -d']'|cut -d'[' -f2` = 'STARTED' ] + [ 'STARTED' = `rc.d list|grep pdnsd|cut -f1 -d']'|cut -d'[' -f2` ] return $? ;; *) @@ -55,7 +55,7 @@ pdnsd_going_up() { pdnsd_going_down() { # Check for active interface, take offline if none is active - if [ ! `nm-tool|grep State|cut -f2 -d' '` = 'connected' ]; then + if [ 'connected' != `nm-tool|grep State|cut -f2 -d' '` ]; then pdnsd_init_command stop else # If another interface is active, restart so we're sure we're using |