projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add sudo access to group cloud-builds
[mirror/dsa-puppet.git]
/
modules
/
roles
/
files
/
static-mirroring
/
static-update-component
diff --git
a/modules/roles/files/static-mirroring/static-update-component
b/modules/roles/files/static-mirroring/static-update-component
index
27b9318
..
455d17d
100755
(executable)
--- a/
modules/roles/files/static-mirroring/static-update-component
+++ b/
modules/roles/files/static-mirroring/static-update-component
@@
-27,6
+27,11
@@
usage() {
}
componentlist=/etc/static-components.conf
}
componentlist=/etc/static-components.conf
+. /etc/staticsync.conf
+if ! [ -n "$staticuser" ]; then
+ echo >&2 "staticuser not configured!"
+ exit 1
+fi
if [ "$#" = 1 ]; then
component="$1"
if [ "$#" = 1 ]; then
component="$1"
@@
-72,10
+77,10
@@
if [ "$srchost" = "$thishost" ] && ! [ -d "$srcdir" ]; then
exit 1
fi
exit 1
fi
-if [ "`id -nu`" != "
staticsync
" ]; then
- sudo -u
staticsync
static-update-component "$@"
+if [ "`id -nu`" != "
$staticuser
" ]; then
+ sudo -u
"$staticuser"
static-update-component "$@"
else
else
- ssh -o AddressFamily=inet -t -o ServerAliveInterval=300 -o PreferredAuthentications=publickey "$masterhost" static-master-update-component "$component"
+ ssh -o AddressFamily=inet -t -
t -
o ServerAliveInterval=300 -o PreferredAuthentications=publickey "$masterhost" static-master-update-component "$component"
fi
# vim:set et:
fi
# vim:set et: