]> git.decadent.org.uk Git - dak.git/blobdiff - config/debian/dinstall.functions
ssh in a while loop really wants -n
[dak.git] / config / debian / dinstall.functions
index 6524d12b9208c43f59922f689803367ed783407d..b8a4b0eb44ccb998dbca0c6bab187cb8db3fcc31 100644 (file)
@@ -19,6 +19,17 @@ function remove_all_locks() {
     rm -f $LOCK_DAILY $LOCK_ACCEPTED
 }
 
+function remove_locks {
+    remove_all_locks
+    trap - EXIT TERM HUP INT QUIT
+    ts "locked part finished"
+}
+
+function lockaccepted {
+    lockfile "$LOCK_ACCEPTED"
+    trap remove_all_locks EXIT TERM HUP INT QUIT
+}
+
 # If we error out this one is called, *FOLLOWED* by cleanup above
 function onerror() {
     ERRDATE=$(date "+%Y.%m.%d-%H:%M:%S")
@@ -45,7 +56,7 @@ function onerror() {
 # pushing merkels QA user, part one
 function qa1() {
     log "Telling QA user that we start dinstall"
-    ssh -2 -i ~dak/.ssh/push_merkel_qa  -o BatchMode=yes -o SetupTimeOut=90 -o ConnectTimeout=90 qa@qa.debian.org sleep 1
+    ssh -n -2 -i ~dak/.ssh/push_merkel_qa  -o BatchMode=yes -o SetupTimeOut=90 -o ConnectTimeout=90 qa@qa.debian.org sleep 1
 }
 
 # Updating various files
@@ -554,6 +565,7 @@ function mirrorpush() {
             echo "Running on host $(hostname -f)" >> /srv/ftp.debian.org/web/${fname}
             sudo -H -u archvsync /home/archvsync/runmirrors ${pusharg} > ~dak/runmirrors-${archive}.log 2>&1 &
         fi
+    done
 }
 
 function mirrorpush-backports() {