Since the binary of 'awk', which is exploited to check the state of the
pass daemon itself, is not included in the Tizen image for the headless
devices, this patch changes the way to restart the PASS daemon itself
after installing or uninstalling this package.
Change-Id: Id830ee185a1fbb5f9d3f8e3fe34b7627345d1d4e
Signed-off-by: Wook Song <wook16.song@samsung.com>
ExclusiveArch: %{arm}
Requires(post): /sbin/ldconfig
+Requires(post): /bin/systemctl
Requires(postun): /sbin/ldconfig
+Requires(postun): /bin/systemctl
Requires: pass >= 0.0.1
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
/sbin/ldconfig
systemd-tmpfiles %{_libdir}/tmpfiles.d/pass-hal.conf --create
if [ -f %{_unitdir}/pass.service ]; then
- systemctl | grep pass.service | awk '{if ($3 == "active" && $4 == "running") system("systemctl restart pass.service")}'
+ systemctl try-restart pass.service
fi
%postun
/sbin/ldconfig
if [ -f %{_unitdir}/pass.service ]; then
- systemctl | grep pass.service | awk '{if ($3 == "active" && $4 == "running") system("systemctl restart pass.service")}'
+ systemctl try-restart pass.service
fi
%files