aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-04-23 08:11:19 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2014-04-23 08:11:19 +0200
commitf912bc78a190325bcf8e5d61a98dd248926af90d (patch)
tree15259bc002632beb2c9413923eb1d48b08e69e6e
parentb90ed41591963d3ef53b656400dfa584b9eb4b8c (diff)
downloadalpine-conf-f912bc78a190325bcf8e5d61a98dd248926af90d.tar.bz2
alpine-conf-f912bc78a190325bcf8e5d61a98dd248926af90d.tar.xz
setup-timezone: remove -p <POSIXTZ> option
-rwxr-xr-xsetup-timezone.in11
1 files changed, 2 insertions, 9 deletions
diff --git a/setup-timezone.in b/setup-timezone.in
index 5034223..8c81a58 100755
--- a/setup-timezone.in
+++ b/setup-timezone.in
@@ -8,13 +8,12 @@ zroot=/usr/share/zoneinfo
usage() {
cat <<__EOF__
-usage: setup-timezone [-h] [-p posixtz format] [-z subfolder of $zroot]
+usage: setup-timezone [-h] [-z subdir of $zroot]
Sets the timezone for the system.
options:
-h Show this help
- -p Specify the timezone in PosixTZ format
-z Specify the timezone as a subfolder of $zroot
__EOF__
exit 1
@@ -43,10 +42,9 @@ valid_tz() {
| xargs posixtz | sort | uniq | grep -q -w "$1"
}
-while getopts "hp:z:" opt; do
+while getopts "hz:" opt; do
case $opt in
h) usage;;
- p) POSIXTZ="$OPTARG";;
z) ZONEINFOFOLDER="$OPTARG";;
esac
done
@@ -59,11 +57,6 @@ zonepath=$(cat /etc/TZ 2>/dev/null)
[ -z "$zonepath" ] && zonepath="UTC"
while true; do
- if [ -n "$POSIXTZ" ]; then
- echo $POSIXTZ > /etc/TZ || rm -f /etc/TZ
- break
- fi
-
if [ -n "$ZONEINFOFOLDER" ]; then
TZ=$(posixtz "$ZONEINFOFOLDER") || echo "Failed to convert '$ZONEINFOFOLDER' to POSIX TZ"
if [ -n "$TZ" ]; then