duplicate the debug stream in /var/log/ami-creator.log and /dev/console
authorPaul Tonelli <paul.tonelli@logilab.fr>
Thu, 30 May 2013 13:56:09 +0200
changeset 128 91b237a7720f
parent 127 c1280b12b455
child 129 9d4caa5f760e
duplicate the debug stream in /var/log/ami-creator.log and /dev/console
others/rc.local
--- a/others/rc.local	Fri May 31 10:32:35 2013 +0200
+++ b/others/rc.local	Thu May 30 13:56:09 2013 +0200
@@ -23,7 +23,7 @@
         sleep 1
     done
     ## wait until no more salt-call is running
-    /usr/bin/env salt-call --no-color state.highstate &> /dev/ttyS0
+    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 ]
@@ -33,7 +33,7 @@
 ## wait until no more salt-call is running
 ## download, untar, resize and mount
 ## update modify image depending on variation.sls file
-/usr/bin/env salt-call --no-color state.sls ami_creator &> /dev/ttyS0
+salt-call --no-color state.sls ami_creator | tee -a /var/log/ami-creator.log > /dev/console 2>&1
 ## umount, resize and upload if possible
 
 exit 0