diff options
Diffstat (limited to 'meta-networking/recipes-support/ntp/ntp')
5 files changed, 35 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/ntp/ntp/ntpd.list b/meta-networking/recipes-support/ntp/ntp/ntpd.list new file mode 100644 index 000000000..d1fe6b7e2 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/ntpd.list | |||
@@ -0,0 +1 @@ | |||
ntpd.service | |||
diff --git a/meta-networking/recipes-support/ntp/ntp/ntpd.service b/meta-networking/recipes-support/ntp/ntp/ntpd.service new file mode 100644 index 000000000..b7c426864 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/ntpd.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Network Time Service | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | PIDFile=/run/ntpd.pid | ||
8 | ExecStart=/usr/sbin/ntpd -p /run/ntpd.pid -g | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-support/ntp/ntp/ntpdate.service b/meta-networking/recipes-support/ntp/ntp/ntpdate.service new file mode 100644 index 000000000..10cbd70f9 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/ntpdate.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Network Time Service (one-shot ntpdate mode) | ||
3 | Before=ntpd.service | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | ExecStart=/usr/bin/ntpdate-sync silent | ||
8 | RemainAfterExit=yes | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||
diff --git a/meta-networking/recipes-support/ntp/ntp/sntp b/meta-networking/recipes-support/ntp/ntp/sntp new file mode 100644 index 000000000..f8c5895b7 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/sntp | |||
@@ -0,0 +1 @@ | |||
NTPSERVER="ntpserver.example.org" | |||
diff --git a/meta-networking/recipes-support/ntp/ntp/sntp.service b/meta-networking/recipes-support/ntp/ntp/sntp.service new file mode 100644 index 000000000..4898b8a70 --- /dev/null +++ b/meta-networking/recipes-support/ntp/ntp/sntp.service | |||
@@ -0,0 +1,11 @@ | |||
1 | [Unit] | ||
2 | Description=Simple Network Time Service Client | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | EnvironmentFile=-/etc/default/sntp | ||
8 | ExecStart=/usr/sbin/sntp -s $NTPSERVER | ||
9 | |||
10 | [Install] | ||
11 | WantedBy=multi-user.target | ||