Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
1f16f7df
Commit
1f16f7df
authored
6 years ago
by
Stéphane Diemer
Browse files
Options
Downloads
Patches
Plain Diff
Handle Debian in NTP setup (refs
#27160
).
parent
578a4dca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
2.Common_services/2.NTP/0_setup.py
+12
-1
12 additions, 1 deletion
2.Common_services/2.NTP/0_setup.py
global-conf.sh
+1
-1
1 addition, 1 deletion
global-conf.sh
with
13 additions
and
2 deletions
2.Common_services/2.NTP/0_setup.py
+
12
−
1
View file @
1f16f7df
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import
subprocess
import
utils
...
...
@@ -11,7 +12,17 @@ def setup(interactive=True):
if
server
.
strip
():
servers
+=
'
pool %s
\n
'
%
server
.
strip
()
if
not
servers
:
servers
=
'
pool ntp.ubuntu.com
\n
'
if
'
Ubuntu
'
in
subprocess
.
getoutput
(
'
lsb_release -a
'
):
servers
+=
'
pool 0.ubuntu.pool.ntp.org iburst
\n
'
servers
+=
'
pool 1.ubuntu.pool.ntp.org iburst
\n
'
servers
+=
'
pool 2.ubuntu.pool.ntp.org iburst
\n
'
servers
+=
'
pool 3.ubuntu.pool.ntp.org iburst
\n
'
servers
+=
'
pool ntp.ubuntu.com
\n
'
else
:
servers
+=
'
pool 0.debian.pool.ntp.org iburst
\n
'
servers
+=
'
pool 1.debian.pool.ntp.org iburst
\n
'
servers
+=
'
pool 2.debian.pool.ntp.org iburst
\n
'
servers
+=
'
pool 3.debian.pool.ntp.org iburst
\n
'
cmds
=
[
# NTP
'
timedatectl set-ntp false
'
,
...
...
This diff is collapsed.
Click to expand it.
global-conf.sh
+
1
−
1
View file @
1f16f7df
...
...
@@ -13,7 +13,7 @@ SKYREACH_SSL_VERIFY='1'
SKYREACH_API_KEY
=
SKYREACH_ACTIVATION_KEY
=
# NTP
NTP_SERVER
=
'
ntp.ubuntu.com
'
NTP_SERVER
=
''
# SSH
SSH_ALLOWED_KEYS
=
SSH_MAINTENANCE_PORT
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment