shadow-utils: add additional service into spec clear_shadow_locks.service service is ported from clear_shadow_lock systemv init script. --- SPECS/shadow-utils.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/SPECS/shadow-utils.spec b/SPECS/shadow-utils.spec index e7f98da..d7e2ba9 100644 --- a/SPECS/shadow-utils.spec +++ b/SPECS/shadow-utils.spec @@ -8,6 +8,8 @@ Source0: http://pkg-shadow.alioth.debian.org/releases/shadow-%{version}.tar.bz2 Source3: http://pkg-shadow.alioth.debian.org/releases/shadow-%{version}.tar.bz2.sig Source1: shadow-utils.login.defs Source2: shadow-utils.useradd +Source4: login.defs.cgcs +Source5: clear_shadow_locks.service Patch0: shadow-4.1.5-redhat.patch Patch1: shadow-4.1.5.1-goodname.patch Patch2: shadow-4.1.5.1-info-parent-dir.patch @@ -133,9 +135,11 @@ make rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT gnulocaledir=$RPM_BUILD_ROOT/%{_datadir}/locale MKINSTALLDIRS=`pwd`/mkinstalldirs install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}/default -install -p -c -m 0644 %{SOURCE1} $RPM_BUILD_ROOT/%{_sysconfdir}/login.defs +install -p -c -m 0644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/login.defs install -p -c -m 0600 %{SOURCE2} $RPM_BUILD_ROOT/%{_sysconfdir}/default/useradd +install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}/init.d +install -D -m644 %{SOURCE5} $RPM_BUILD_ROOT/%{_unitdir}/clear_shadow_locks.service ln -s useradd $RPM_BUILD_ROOT%{_sbindir}/adduser #ln -s %{_mandir}/man8/useradd.8 $RPM_BUILD_ROOT/%{_mandir}/man8/adduser.8 @@ -221,6 +225,8 @@ rm -rf $RPM_BUILD_ROOT %{_sbindir}/adduser %attr(0750,root,root) %{_sbindir}/user* %attr(0750,root,root) %{_sbindir}/group* +%{_unitdir}/clear_shadow_locks.service + %{_sbindir}/grpck %{_sbindir}/pwck %{_sbindir}/*conv @@ -248,6 +254,15 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/vipw.8* %{_mandir}/man8/vigr.8* +%post +%systemd_post clear_shadow_locks.service + +%preun +%systemd_preun clear_shadow_locks.service + +%postun +%systemd_postun_with_restart clear_shadow_locks.service + %changelog * Tue Jun 28 2016 Tomáš Mráz - 2:4.1.5.1-24 - useradd: fix typo in japanese translation (#1202629) -- 1.8.3.1