summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorCorentin Lecouvey <corentin.lecouvey@eurogiciel.fr>2013-07-02 09:39:54 +0200
committerCorentin Lecouvey <corentin.lecouvey@eurogiciel.fr>2013-07-02 10:56:40 +0200
commita42a42900114a39a03fcf44d22d971dfc961bd67 (patch)
treee51fa6f410c2faa8b8c397e817bcbd0af45c3a48 /packaging
parentb9fb00a2bc5b44ebea64faaa7cb186764901c977 (diff)
downloadconnman-a42a42900114a39a03fcf44d22d971dfc961bd67.tar.gz
connman-a42a42900114a39a03fcf44d22d971dfc961bd67.tar.bz2
connman-a42a42900114a39a03fcf44d22d971dfc961bd67.zip
packaging: move NTP scripts to packaging directory
Diffstat (limited to 'packaging')
-rw-r--r--packaging/40-connman-ntp.list1
-rw-r--r--packaging/connman-ntp.service12
-rw-r--r--packaging/connman.spec5
3 files changed, 17 insertions, 1 deletions
diff --git a/packaging/40-connman-ntp.list b/packaging/40-connman-ntp.list
new file mode 100644
index 00000000..9b842821
--- /dev/null
+++ b/packaging/40-connman-ntp.list
@@ -0,0 +1 @@
+connman-ntp.service
diff --git a/packaging/connman-ntp.service b/packaging/connman-ntp.service
new file mode 100644
index 00000000..1978f743
--- /dev/null
+++ b/packaging/connman-ntp.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Connman NTP service
+After=syslog.target
+
+[Service]
+Type=oneshot
+ExecStart=/bin/bash -c "dbus-send --system --type=method_call --print-reply --dest=net.connman / net.connman.Clock.SetProperty string:'TimeUpdates' variant:string:'auto'"
+ExecStop=/bin/bash -c "dbus-send --system --type=method_call --print-reply --dest=net.connman / net.connman.Clock.SetProperty string:'TimeUpdates' variant:string:'manual'"
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
diff --git a/packaging/connman.spec b/packaging/connman.spec
index a43baab2..2b04cc23 100644
--- a/packaging/connman.spec
+++ b/packaging/connman.spec
@@ -6,6 +6,8 @@ Summary: Connection Manager
Url: http://connman.net
Group: Connectivity/Connection Management
Source0: %{name}-%{version}.tar.xz
+Source10: 40-connman-ntp.list
+Source11: connman-ntp.service
Source1001: connman.manifest
BuildRequires: systemd
BuildRequires: pkgconfig(dbus-1)
@@ -51,7 +53,8 @@ Header files and development files for connman.
%prep
%setup -q
-
+cp %{SOURCE10} .
+cp %{SOURCE11} .
cp %{SOURCE1001} .
%build