Skip to content
Snippets Groups Projects
Commit 603c05f7 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Use UTC when calling date command

parent ded30adf
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ BLKID=blkid ...@@ -35,6 +35,7 @@ BLKID=blkid
BLOCKDEV=blockdev BLOCKDEV=blockdev
REGLOOKUP=reglookup REGLOOKUP=reglookup
CHNTPW=chntpw CHNTPW=chntpw
DATE="date -u" # Time in UTC
CLEANUP=( ) CLEANUP=( )
ERRORS=( ) ERRORS=( )
......
...@@ -90,7 +90,7 @@ if [ -z "$SNF_IMAGE_PROPERTY_EXCLUDE_ALL_TASKS" ]; then ...@@ -90,7 +90,7 @@ if [ -z "$SNF_IMAGE_PROPERTY_EXCLUDE_ALL_TASKS" ]; then
echo "Execute all snf-image tasks...." echo "Execute all snf-image tasks...."
$RUN_PARTS -v --exit-on-error "@tasksdir@" 2>&1| $RUN_PARTS -v --exit-on-error "@tasksdir@" 2>&1|
while IFS= read -r line; do while IFS= read -r line; do
echo $(date +%Y:%m:%d-%H:%M:%S.%N) "$line" echo $($DATE +%Y:%m:%d-%H:%M:%S.%N) "$line"
done done
fi fi
......
...@@ -24,6 +24,7 @@ QEMU_IMG="qemu-img" ...@@ -24,6 +24,7 @@ QEMU_IMG="qemu-img"
INSTALL_MBR="install-mbr" INSTALL_MBR="install-mbr"
TIMEOUT="timeout" TIMEOUT="timeout"
CURL="curl" CURL="curl"
DATE="date -u" # Time in UTC
# Temporary use stderr as monitoring file descriptor. # Temporary use stderr as monitoring file descriptor.
# `create' will overwrite this # `create' will overwrite this
......
...@@ -166,7 +166,7 @@ add_cleanup rm "$snapshot" ...@@ -166,7 +166,7 @@ add_cleanup rm "$snapshot"
"$QEMU_IMG" create -f qcow2 -b "$HELPER_IMG" "$snapshot" "$QEMU_IMG" create -f qcow2 -b "$HELPER_IMG" "$snapshot"
echo -n "$(date +%Y:%m:%d-%H:%M:%S.%N) " >&2 echo -n "$($DATE +%Y:%m:%d-%H:%M:%S.%N) " >&2
log_info "Starting customization VM..." log_info "Starting customization VM..."
set +e set +e
$TIMEOUT -k "$HELPER_HARD_TIMEOUT" "$HELPER_SOFT_TIMEOUT" \ $TIMEOUT -k "$HELPER_HARD_TIMEOUT" "$HELPER_SOFT_TIMEOUT" \
...@@ -196,7 +196,7 @@ if [ $rc -ne 0 ]; then ...@@ -196,7 +196,7 @@ if [ $rc -ne 0 ]; then
fi fi
exit 1 exit 1
else else
echo -n "$(date +%Y:%m:%d-%H:%M:%S.%N)" >&2 echo -n "$($DATE +%Y:%m:%d-%H:%M:%S.%N)" >&2
log_info "Customization VM finished." log_info "Customization VM finished."
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment