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
alpine
alpine-conf
Commits
76aa606b
Commit
76aa606b
authored
Apr 23, 2014
by
Natanael Copa
Browse files
setup-timezone: code cleanup. rename zonepath to timezone
parent
6a77f1b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup-timezone.in
View file @
76aa606b
...
...
@@ -79,10 +79,10 @@ fi
apk add
--quiet
$pkg
if
[
-L
"
${
ROOT
}
"
etc/zoneinfo/localtime
]
;
then
zone
path
=
$(
readlink
"
${
ROOT
}
"
etc/zoneinfo/localtime
)
zonepath
=
${
zonepath
#*/zoneinfo/
}
time
zone
=
$(
readlink
"
${
ROOT
}
"
etc/zoneinfo/localtime
)
timezone
=
${
timezone
#*/zoneinfo/
}
else
zone
path
=
UTC
time
zone
=
UTC
fi
...
...
@@ -92,28 +92,28 @@ while true; do
break
fi
echo
-n
"Which timezone are you in? ('?' for list) [
$zone
path
] "
default_read
zonepath
"
$zonepath
"
case
"
$zone
path
"
in
echo
-n
"Which timezone are you in? ('?' for list) [
$
time
zone
] "
default_read
timezone
"
$timezone
"
case
"
$
time
zone
"
in
""
)
continue
;;
"?"
)
show_tz_list
;
continue
;;
esac
while
[
-d
"
$zroot
/
$zone
path
"
]
;
do
while
[
-d
"
$zroot
/
$
time
zone
"
]
;
do
zone
=
echo
-n
"What sub-timezone of '
$zone
path
' are you in? ('?' for list) "
echo
-n
"What sub-timezone of '
$
time
zone
' are you in? ('?' for list) "
default_read zone
case
"
$zone
"
in
"?"
)
show_tz_list
"
$zone
path
"
;
continue
;;
"?"
)
show_tz_list
"
$
time
zone
"
;
continue
;;
esac
zonepath
=
"
$zonepath
/
$zone
"
timezone
=
"
$timezone
/
$zone
"
done
if
[
-f
"
$zroot
/
$zone
path
"
]
;
then
setup_tz
"
$zroot
/
$zone
path
"
if
[
-f
"
$zroot
/
$
time
zone
"
]
;
then
setup_tz
"
$zroot
/
$
time
zone
"
break
fi
echo
"'
$zone
path
' is not a valid timezone on this system"
echo
"'
$
time
zone
' is not a valid timezone on this system"
done
if
[
-n
"
$apkdel
"
]
;
then
...
...
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