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
8a611e2b
Commit
8a611e2b
authored
Jul 31, 2011
by
Jeff Bilyk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-ntp: actually commit the script
parent
43e5c986
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
setup-ntp.in
setup-ntp.in
+51
-0
No files found.
setup-ntp.in
0 → 100755
View file @
8a611e2b
#!/bin/sh
PREFIX
=
.
"
$PREFIX
/lib/libalpine.sh"
usage
()
{
cat
<<
__EOF__
usage: setup-ntp [-hn]
Setup NTP time synchronization
options:
-h Show this help
-n Don't prompt, just use defaults
__EOF__
exit
1
}
while
getopts
"hn"
opt
;
do
case
$opt
in
n
)
PROMPT
=
"0"
;;
h
)
usage
;;
esac
done
if
[
"
$PROMPT
"
!=
"0"
]
;
then
echo
"Which NTP service would you like to use? (openntpd, chrony, none) [openntpd]"
default_read ntpchoice
"openntpd"
if
[
"
$ntpchoice
"
=
"none"
]
;
then
exit
0
fi
fi
acfinstalled
=
"
`
apk version acf-core
-q
|
awk
'{print $1}'
`
"
if
[
"
$ntpchoice
"
=
"chrony"
]
;
then
if
[
"
$acfinstalled
"
!=
"ERROR:"
]
;
then
apk add acf-chrony
-q
else
apk add chrony
-q
fi
echo
"10 chronypass"
>
/etc/chrony/chrony.keys
/etc/init.d/chronyd start
rc-update add chronyd default
elif
[
"
$ntpchoice
"
=
"openntpd"
]
;
then
apk add openntpd
-q
/etc/init.d/ntpd start
rc-update add ntpd default
fi
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