aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-04-23 11:22:12 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2014-04-23 11:34:25 +0200
commit76aa606ba0c414406e0a164275350aba13817f08 (patch)
treef8e770caf96c0abae83ed506ee5fda843507cffe
parent6a77f1b9570ebaea4bf2922791a480285f0a1259 (diff)
downloadalpine-conf-76aa606ba0c414406e0a164275350aba13817f08.tar.bz2
alpine-conf-76aa606ba0c414406e0a164275350aba13817f08.tar.xz
setup-timezone: code cleanup. rename zonepath to timezone
-rwxr-xr-xsetup-timezone.in26
1 files changed, 13 insertions, 13 deletions
diff --git a/setup-timezone.in b/setup-timezone.in
index 9220e03..41e1f10 100755
--- a/setup-timezone.in
+++ b/setup-timezone.in
@@ -79,10 +79,10 @@ fi
apk add --quiet $pkg
if [ -L "${ROOT}"etc/zoneinfo/localtime ]; then
- zonepath=$(readlink "${ROOT}"etc/zoneinfo/localtime)
- zonepath=${zonepath#*/zoneinfo/}
+ timezone=$(readlink "${ROOT}"etc/zoneinfo/localtime)
+ timezone=${timezone#*/zoneinfo/}
else
- zonepath=UTC
+ timezone=UTC
fi
@@ -92,28 +92,28 @@ while true; do
break
fi
- echo -n "Which timezone are you in? ('?' for list) [$zonepath] "
- default_read zonepath "$zonepath"
- case "$zonepath" in
+ echo -n "Which timezone are you in? ('?' for list) [$timezone] "
+ default_read timezone "$timezone"
+ case "$timezone" in
"") continue;;
"?") show_tz_list; continue;;
esac
- while [ -d "$zroot/$zonepath" ]; do
+ while [ -d "$zroot/$timezone" ]; do
zone=
- echo -n "What sub-timezone of '$zonepath' are you in? ('?' for list) "
+ echo -n "What sub-timezone of '$timezone' are you in? ('?' for list) "
default_read zone
case "$zone" in
- "?") show_tz_list "$zonepath"; continue;;
+ "?") show_tz_list "$timezone"; continue;;
esac
- zonepath="$zonepath/$zone"
+ timezone="$timezone/$zone"
done
- if [ -f "$zroot/$zonepath" ]; then
- setup_tz "$zroot/$zonepath"
+ if [ -f "$zroot/$timezone" ]; then
+ setup_tz "$zroot/$timezone"
break
fi
- echo "'$zonepath' is not a valid timezone on this system"
+ echo "'$timezone' is not a valid timezone on this system"
done
if [ -n "$apkdel" ]; then