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
b90ed415
Commit
b90ed415
authored
Mar 17, 2014
by
Eivind Uggedal
Committed by
Natanael Copa
Mar 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup-ntp: allow selecting busybox ntpd
parent
853ea856
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
setup-ntp.in
setup-ntp.in
+8
-4
No files found.
setup-ntp.in
View file @
b90ed415
...
...
@@ -12,7 +12,7 @@ Setup NTP time synchronization
options:
-h Show this help
-c Choice of NTP daemon:
chrony openntpd
none
-c Choice of NTP daemon:
busybox openntpd chrony
none
__EOF__
exit
1
}
...
...
@@ -25,7 +25,7 @@ while getopts "hc:" opt; do
done
if
[
-z
"
$ntpchoice
"
]
;
then
echo
-n
"Which NTP client to run? ('openntpd', 'chrony' or 'none') [chrony] "
echo
-n
"Which NTP client to run? ('
busybox', '
openntpd', 'chrony' or 'none') [chrony] "
default_read ntpchoice
"chrony"
fi
...
...
@@ -35,6 +35,10 @@ case "$ntpchoice" in
none|abort
)
exit
0
;;
busybox
)
pkgs
=
''
svc
=
ntpd
;;
chrony
)
if
apk info
--installed
--quiet
acf-core
;
then
pkgs
=
"
$pkgs
acf-chrony"
...
...
@@ -42,11 +46,11 @@ chrony)
svc
=
chronyd
;;
openntpd
)
svc
=
ntpd
svc
=
open
ntpd
;;
esac
apk add
--quiet
$pkgs
[
-z
"
$pkgs
"
]
||
apk add
--quiet
$pkgs
rc-update add
$svc
default
rc-service
$svc
start
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