Add rpm post/postun script for activate/deactivate zone 99/67499/2
authorSungbae Yoo <sungbae.yoo@samsung.com>
Wed, 27 Apr 2016 01:42:57 +0000 (10:42 +0900)
committerSungbae Yoo <sungbae.yoo@samsung.com>
Wed, 27 Apr 2016 05:19:29 +0000 (14:19 +0900)
Change-Id: I9ed738d6a9f5f245cc1b9a77197fca95886be605
Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
packaging/device-policy-manager.spec

index 60e872b..799bd5d 100644 (file)
@@ -157,11 +157,6 @@ BuildRequires: pkgconfig(evas)
 %description -n org.tizen.ode
 Tizen ODE User Interface for device policy management
 
-%post -n org.tizen.ode
-/sbin/ldconfig
-%postun -n org.tizen.ode
-/sbin/ldconfig
-
 %define odeapp_home %{TZ_SYS_RO_APP}/org.tizen.ode
 
 %files -n org.tizen.ode
@@ -182,11 +177,6 @@ Requires: libdpm = %{version}-%{release}
 %description -n org.tizen.zone-setup-wizard
 Tizen ZONE setup wizard interface for zone
 
-%post -n org.tizen.zone-setup-wizard
-%{_sbindir}/ldconfig
-%postun -n org.tizen.zone-setup-wizard
-%{_sbindir}/ldconfig
-
 %define setup_home %{TZ_SYS_RO_APP}/org.tizen.zone-setup-wizard
 
 mkdir -p %{setup_home}/data
@@ -212,12 +202,6 @@ BuildRequires: pkgconfig(capi-system-system-settings)
 %description -n org.tizen.dpm-syspopup
 Tizen DPM system popup interface package
 
-%post -n org.tizen.dpm-syspopup
-%{_sbindir}/ldconfig
-
-%postun -n org.tizen.dpm-syspopup
-%{_sbindir}/ldconfig
-
 %files -n org.tizen.dpm-syspopup
 %defattr(-,root,root,-)
 %{TZ_SYS_RO_APP}/org.tizen.dpm-syspopup/bin/*
@@ -233,6 +217,13 @@ Requires: systemd
 %description -n dpm-pam-zone
 PAM Plugin for zone policy in device policy manager and CLI tool
 
+%post -n dpm-pam-zone
+mv /etc/pam.d/systemd-user /etc/pam.d/systemd-user.old
+cp /etc/pam.d/systemd-user-zone /etc/pam.d/systemd-user
+
+%postun -n dpm-pam-zone
+mv /etc/pam.d/systemd-user.old /etc/pam.d/systemd-user
+
 %files -n dpm-pam-zone
 %defattr(600,root,root,700)
 %attr(700,root,root) %{_libdir}/security/pam_*.so