harmonizing logs
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 18 Jan 2016 13:59:00 +0000 (14:59 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Mon, 18 Jan 2016 13:59:08 +0000 (14:59 +0100)
bin/lxc-sliceimage
initscripts/vserver-sliceimage

index 51ff659..d0c4438 100755 (executable)
@@ -28,8 +28,7 @@ function check_node () {
 
 function start () {
 
-    echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
-    echo "lxc-sliceimage: starting on $(date)"
+    echo "lxc-sliceimage: --- STARTING $(date) ---"
 
     check_node
     
@@ -62,8 +61,7 @@ function start () {
     # create ref images from stubs
     unfold_system_slices
 
-    echo "lxc-sliceimage: done on $(date)"
-    echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
+    echo "lxc-sliceimage: --- DONE $(date) ---"
 }
 
 function status () {
@@ -220,7 +218,7 @@ function unfold_system_slice_from_cloned () {
 # run with the --tty option to see results, otherwise get that logged
 case "$1" in
     --tty) shift;;
-    *) exec >> /var/log/lxc-sliceimage.log 2>&1 ;;
+    *) exec >> /var/log/lxc-sliceimage 2>&1 ;;
 esac
 
 case "$1" in
index 4cee530..ac52dd7 100755 (executable)
@@ -40,7 +40,7 @@ exec 4>&2
 exec >>/var/log/vserver-sliceimage
 exec 2>&1
 
-echo "--- STARTING $(date) ---"  >&3 2>&4
+echo "vserver-sliceimage: --- STARTING $(date) ---"
 
 # Parse PLC configuration
 if [ -r /etc/planetlab/plc_config ] ; then
@@ -94,7 +94,7 @@ for clonedstamp in "$__DEFAULT_VSERVERDIR/.vstub/"*/*.cloned ; do
     [ -n "$FORCE" ] && message=Force-building
     
     # Copy base reference image
-    echo -n $"$message slice image for $NAME in $VREFNAME: " >&3 2>&4
+    echo -n $"$message slice image for $NAME in $VREFNAME: "
 
     # Build in temporary directory
     mkdir -p "$__DEFAULT_VSERVERDIR/.vtmp"
@@ -190,7 +190,7 @@ for cacert in $CACERT ; do
 done
 
 success >&3 2>&4
-echo "--- DONE $(date) ---"  >&3 2>&4
+echo "vserver-sliceimage: --- DONE $(date) ---"
 echo >&3 2>&4
 
 exit 0