From c784ac023826f2a1734e5d7af7ae8e6cc78acdc7 Mon Sep 17 00:00:00 2001 From: Geoffroy Van Cutsem Date: Thu, 6 Sep 2012 01:17:50 +0200 Subject: [PATCH] Remove old sysinit script and enhance systemd-related scriptlets --- packaging/ofono.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/packaging/ofono.spec b/packaging/ofono.spec index 5a9cf61..792d0b3 100644 --- a/packaging/ofono.spec +++ b/packaging/ofono.spec @@ -62,13 +62,15 @@ make %{?jobs:-j%jobs} mkdir -p %{buildroot}/usr/lib/systemd/system/network.target.wants ln -s ../ofono.service %{buildroot}/usr/lib/systemd/system/network.target.wants/ofono.service -mkdir -p %{buildroot}/etc/rc.d/init.d -cp %{SOURCE1} %{buildroot}/etc/rc.d/init.d/ofono -chmod +x %{buildroot}/etc/rc.d/init.d/ofono - %post -ln -sf ../init.d/ofono /etc/rc.d/rc3.d/S61ofono -ln -sf ../init.d/ofono /etc/rc.d/rc5.d/S61ofono +systemctl daemon-reload +systemctl restart ofono.service + +%preun +systemctl stop ofono.service + +%postun +systemctl daemon-reload %docs_package @@ -78,7 +80,6 @@ ln -sf ../init.d/ofono /etc/rc.d/rc5.d/S61ofono /usr/lib/systemd/system/network.target.wants/ofono.service /usr/lib/systemd/system/ofono.service /etc/ofono/phonesim.conf -/etc/rc.d/init.d/* %files devel %{_includedir}/ofono/*.h -- 2.7.4