This patch simply changes the way to restart the pass daemon after
installing or uninstalling this package. 'awk' is no longer needed. Note
that the option 'try-restart' of systemctl is to restart one or more
units (in this context, means the pass daemon) if active.
Change-Id: I29f996dd05af0d681a1f3ce31f13c835fe5835ea
Signed-off-by: Wook Song <wook16.song@samsung.com>
ExclusiveArch: %{arm} aarch64
Requires(post): /sbin/ldconfig
+Requires(post): /bin/systemctl
Requires(postun): /sbin/ldconfig
+Requires(postun): /bin/systemctl
Requires: pass >= 0.0.1
Requires: pass-hal-standard >= 0.0.1
BuildRequires: cmake
%post
/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
%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