Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
alpine-conf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
18
Issues
18
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
alpine-conf
Commits
f912bc78
Commit
f912bc78
authored
Apr 23, 2014
by
Natanael Copa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-timezone: remove -p <POSIXTZ> option
parent
b90ed415
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
setup-timezone.in
setup-timezone.in
+2
-9
No files found.
setup-timezone.in
View file @
f912bc78
...
...
@@ -8,13 +8,12 @@ zroot=/usr/share/zoneinfo
usage
()
{
cat
<<
__EOF__
usage: setup-timezone [-h] [-
p posixtz format] [-z subfolde
r of
$zroot
]
usage: setup-timezone [-h] [-
z subdi
r 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
"h
p:
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
...
...
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