Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-image
Commits
603c05f7
Commit
603c05f7
authored
Sep 24, 2012
by
Nikos Skalkotos
Browse files
Use UTC when calling date command
parent
ded30adf
Changes
4
Hide whitespace changes
Inline
Side-by-side
snf-image-helper/common.sh
View file @
603c05f7
...
...
@@ -35,6 +35,7 @@ BLKID=blkid
BLOCKDEV
=
blockdev
REGLOOKUP
=
reglookup
CHNTPW
=
chntpw
DATE
=
"date -u"
# Time in UTC
CLEANUP
=(
)
ERRORS
=(
)
...
...
snf-image-helper/snf-image-helper.in
View file @
603c05f7
...
...
@@ -90,7 +90,7 @@ if [ -z "$SNF_IMAGE_PROPERTY_EXCLUDE_ALL_TASKS" ]; then
echo
"Execute all snf-image tasks...."
$RUN_PARTS
-v
--exit-on-error
"@tasksdir@"
2>&1|
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
fi
...
...
snf-image-host/common.sh.in
View file @
603c05f7
...
...
@@ -24,6 +24,7 @@ QEMU_IMG="qemu-img"
INSTALL_MBR="install-mbr"
TIMEOUT="timeout"
CURL="curl"
DATE="date -u" # Time in UTC
# Temporary use stderr as monitoring file descriptor.
# `create' will overwrite this
...
...
snf-image-host/create
View file @
603c05f7
...
...
@@ -166,7 +166,7 @@ add_cleanup rm "$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..."
set
+e
$TIMEOUT
-k
"
$HELPER_HARD_TIMEOUT
"
"
$HELPER_SOFT_TIMEOUT
"
\
...
...
@@ -196,7 +196,7 @@ if [ $rc -ne 0 ]; then
fi
exit
1
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."
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment