update: hg trust root
authorTero Marttila <terom@paivola.fi>
Tue, 20 Mar 2012 14:35:38 +0200
changeset 58 6292cb597954
parent 57 d83a5e9be193
child 59 b0c761c4d5f8
update: hg trust root
bin/update
lib/update.utils
--- a/bin/update	Tue Mar 20 14:30:16 2012 +0200
+++ b/bin/update	Tue Mar 20 14:35:38 2012 +0200
@@ -44,7 +44,10 @@
 
 # External bins
 NAMED_CHECKZONE=/usr/sbin/named-checkzone
+
 HG=/usr/bin/hg
+HG_ARGS=(--config trusted.users=root)
+
 RNDC=/usr/sbin/rndc
 
 # Path to rndc key, must be readable to run..
--- a/lib/update.utils	Tue Mar 20 14:30:16 2012 +0200
+++ b/lib/update.utils	Tue Mar 20 14:35:38 2012 +0200
@@ -58,7 +58,7 @@
 function hg {
     local repo=$REPO
 
-    cmd $HG -R $ROOT/$repo "$@"
+    cmd $HG -R $ROOT/$repo "${HG_ARGS[@]}" "$@"
 }
 
 # Does the repo have local modifications?