summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@io.vyatta.com>2007-12-13 18:36:43 -0800
committerTom Grennan <tgrennan@io.vyatta.com>2007-12-13 18:36:43 -0800
commit8d6bac43ac6604b3c2a0ac9315a2e5c168299a5a (patch)
tree4764a95a26a97186c638b8c37ce5335d7df85b8e /scripts
parent9a781e1b6dbdba52ea430499d48730b6b311dd5c (diff)
parentfddadb2df7980fe86deabb0bfa27189d52479a0e (diff)
downloadvyatta-cfg-8d6bac43ac6604b3c2a0ac9315a2e5c168299a5a.tar.gz
vyatta-cfg-8d6bac43ac6604b3c2a0ac9315a2e5c168299a5a.zip
Merge branch 'master' of http://phuket.vyatta.com/vyatta-cfg
Diffstat (limited to 'scripts')
-rw-r--r--scripts/VyattaConfigDOMTree.pm2
-rwxr-xr-xscripts/vyatta-cfg-notify4
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/VyattaConfigDOMTree.pm b/scripts/VyattaConfigDOMTree.pm
index d951202..86aabf8 100644
--- a/scripts/VyattaConfigDOMTree.pm
+++ b/scripts/VyattaConfigDOMTree.pm
@@ -307,7 +307,7 @@ sub getSubNodesNumber {
my @subs = $node->getSubNodes();
- if(defined @subs) {
+ if(@subs) {
$ret = $#subs + 1;
}
}
diff --git a/scripts/vyatta-cfg-notify b/scripts/vyatta-cfg-notify
index 82dc6a3..07a385d 100755
--- a/scripts/vyatta-cfg-notify
+++ b/scripts/vyatta-cfg-notify
@@ -1,11 +1,13 @@
#!/bin/bash
+[ -r /etc/default/vyatta ] && source /etc/default/vyatta
+
declare cur_tty=$(ps -o tty= |head -n1)
declare cur_uid=($(ps -o ruser= n |head -n1))
declare cur_user=$(grep "[^:]\+:[^:]*:${cur_uid[0]}:" /etc/passwd \
| cut -d ':' -f 1)
declare -a ulist=( $(ps -a -o args,tty,ruser n \
- | grep '^newgrp quaggavty' | cut -c 29-) )
+ | grep "^newgrp $VYATTA_CFG_GROUP_NAME" | cut -c 29-) )
for (( i = 0; i < ${#ulist[@]}; i += 2 )); do
utty=${ulist[i]}