Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
8f51dec6
Commit
8f51dec6
authored
Apr 26, 2017
by
Mike Hibler
Browse files
Don't try to optimize the setup of /etc/localtime, just replace it.
parent
7a820773
Changes
1
Show whitespace changes
Inline
Side-by-side
clientside/tmcc/common/localize_image
View file @
8f51dec6
...
...
@@ -134,21 +134,16 @@ localize_image() {
# Check the time zone.
if
[
-e
/etc/localtime
]
;
then
# XXX might be a symlink to /usr/share which we cannot resolve
if
[
-L
$MNT
/etc/localtime
]
;
then
rm
$MNT
/etc/localtime
cp
/dev/null
$MNT
/etc/localtime
fi
cmp
-s
/etc/localtime
$MNT
/etc/localtime
if
[
$?
-ne
0
]
;
then
echo
" updating /etc/localtime"
# XXX might be a symlink to /usr/share which we cannot resolve to
# compare, so just unconditionally replace it.
rm
-f
$MNT
/etc/localtime
echo
" updating /etc/localtime"
cp
-pf
/etc/localtime
$MNT
/etc/localtime
||
{
echo
"Failed to create /etc/localtime"
return
1
}
fi
fi
# Check the NTP configuration.
if
[
-e
/etc/ntp.conf
]
;
then
...
...
Write
Preview
Supports
Markdown
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