remove the sleeps which are not useful
authorPaul Tonelli <paul.tonelli@logilab.fr>
Thu, 30 May 2013 14:03:26 +0200
changeset 143 fbb305bc2f56
parent 142 5cc4bcca328b
child 144 3bdd37e41e73
remove the sleeps which are not useful
others/rc.local
--- a/others/rc.local	Thu May 30 14:01:49 2013 +0200
+++ b/others/rc.local	Thu May 30 14:03:26 2013 +0200
@@ -18,19 +18,9 @@
 ## get updated code if necessary 
 for i in `seq 3`
 do
-    while [ `ps auxf |grep salt-call |grep -v grep|wc -l` -ne 0 ]
-    do
-        sleep 1
-    done
-    ## wait until no more salt-call is running
     salt-call --no-color state.highstate | tee -a /var/log/ami-creator.log > /dev/console 2>&1
 done
 
-while [ `ps auxf |grep salt-call |grep -v grep|wc -l` -ne 0 ]
-do
-    sleep 1
-done
-## wait until no more salt-call is running
 ## download, untar, resize and mount
 ## update modify image depending on variation.sls file
 salt-call --no-color state.sls ami_creator | tee -a /var/log/ami-creator.log > /dev/console 2>&1