summarylogtreecommitdiffstats
path: root/00-pdnsd
diff options
context:
space:
mode:
authorFrederik "Freso" S. Olesen2012-09-27 21:35:12 +0200
committerFrederik “Freso” S. Olesen2012-09-27 21:35:12 +0200
commit4e70e00f2e63ea4abc97d33d1cdd5312163196ba (patch)
treeec875844b7b184d89a2f4b88e74f40cac9d189f3 /00-pdnsd
parentffe76cfc1fb5b95f9069479e1217d10b69b839a9 (diff)
downloadaur-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-x00-pdnsd4
1 files changed, 2 insertions, 2 deletions
diff --git a/00-pdnsd b/00-pdnsd
index c876b6600cc9..ed7ab1ce87b3 100755
--- a/00-pdnsd
+++ b/00-pdnsd
@@ -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