Commit 21a2a17a authored by Natanael Copa's avatar Natanael Copa
Browse files

setup-timezone: fix use of -z option

ref #4518
parent 848a2ab2
...@@ -8,7 +8,7 @@ zroot=/usr/share/zoneinfo ...@@ -8,7 +8,7 @@ zroot=/usr/share/zoneinfo
usage() { usage() {
cat <<__EOF__ cat <<__EOF__
usage: setup-timezone [-h] [-k|-i] [-z subdir of $zroot] usage: setup-timezone [-h] [-k|-i] [-z TIMEZONE]
Sets the timezone for the system. Sets the timezone for the system.
...@@ -16,7 +16,7 @@ options: ...@@ -16,7 +16,7 @@ options:
-h Show this help -h Show this help
-i Install tzdata and symlink instead of making a copy -i Install tzdata and symlink instead of making a copy
-k Keep previous copies of tzdata -k Keep previous copies of tzdata
-z Specify the timezone as a subdirectory of $zroot -z Set given timezone. (relative $zroot)
__EOF__ __EOF__
exit 1 exit 1
} }
...@@ -64,7 +64,7 @@ while getopts "hikz:" opt; do ...@@ -64,7 +64,7 @@ while getopts "hikz:" opt; do
h) usage;; h) usage;;
i) INSTALL_TZDATA=true;; i) INSTALL_TZDATA=true;;
k) KEEP_TZDATA=true;; k) KEEP_TZDATA=true;;
z) ZONEINFODIR="$OPTARG";; z) ZONE="$OPTARG";;
esac esac
done done
...@@ -87,8 +87,8 @@ fi ...@@ -87,8 +87,8 @@ fi
while true; do while true; do
if [ -n "$ZONEINFODIR" ]; then if [ -n "$ZONE" ]; then
setup_tz "$ZONEINFODIR" setup_tz "$zroot"/"$ZONE"
break break
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment