projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Try to allow for individual pushes of static components at the cost of having a singl...
[mirror/dsa-puppet.git]
/
modules
/
roles
/
files
/
static-mirroring
/
static-mirror-run
diff --git
a/modules/roles/files/static-mirroring/static-mirror-run
b/modules/roles/files/static-mirroring/static-mirror-run
index
038700d
..
72f7aea
100755
(executable)
--- a/
modules/roles/files/static-mirroring/static-mirror-run
+++ b/
modules/roles/files/static-mirroring/static-mirror-run
@@
-1,6
+1,6
@@
#!/bin/bash
#!/bin/bash
-# initiate a
mirror staged mirror update from sync-source
.
+# initiate a
staged mirror update from sync-source for a component
.
#
# if we have a serial file and we got a serial on the command line, only sync if the serial is different
#
# if we have a serial file and we got a serial on the command line, only sync if the serial is different
@@
-119,16
+119,18
@@
lock() {
log_setup
log_setup
-#log "called with $* and ${SSH_ORIGINAL_COMMAND:-no ssh original command options}."
log "called with $*"
lock
if [ -e "${BASEDIR}${ACTIVE}" ] && [ "$(readlink "${BASEDIR}${ACTIVE}")" = "$ALPHA" ] ; then
staging="$BRAVO"
active="$ALPHA"
log "called with $*"
lock
if [ -e "${BASEDIR}${ACTIVE}" ] && [ "$(readlink "${BASEDIR}${ACTIVE}")" = "$ALPHA" ] ; then
staging="$BRAVO"
active="$ALPHA"
-el
se
+el
if [ -e "${BASEDIR}${ACTIVE}" ] && [ "$(readlink "${BASEDIR}${ACTIVE}")" = "$BRAVO" ] ; then
staging="$ALPHA"
active="$BRAVO"
staging="$ALPHA"
active="$BRAVO"
+else
+ echo >&5 "Invalid state of ${BASEDIR}${ACTIVE}."
+ exit 1
fi
log "active is $active; staging is $staging"
fi
log "active is $active; staging is $staging"