Add rpm scriptlets for systemd-oomd subpackage

Related: #1962255
This commit is contained in:
Michal Sekletar 2021-05-25 16:03:49 +00:00
parent e111e38c12
commit c25a280dca

View File

@ -626,8 +626,6 @@ getent group systemd-journal &>/dev/null || groupadd -r -g 190 systemd-journal 2
getent group systemd-coredump &>/dev/null || groupadd -r systemd-coredump 2>&1 || :
getent passwd systemd-coredump &>/dev/null || useradd -r -l -g systemd-coredump -d / -s /sbin/nologin -c "systemd Core Dumper" systemd-coredump &>/dev/null || :
getent group systemd-oom &>/dev/null || groupadd -r systemd-oom 2>&1 || :
getent passwd systemd-oom &>/dev/null || useradd -r -l -g systemd-oom -d / -s /sbin/nologin -c "systemd Userspace OOM Killer" systemd-oom &>/dev/null || :
%post
systemd-machine-id-setup &>/dev/null || :
@ -687,7 +685,7 @@ if [ $1 -eq 1 ]; then
systemd-tmpfiles --create &>/dev/null || :
fi
%systemd_postun_with_restart systemd-timedated.service systemd-hostnamed.service systemd-journald.service systemd-localed.service systemd-oomd.service
%systemd_postun_with_restart systemd-timedated.service systemd-hostnamed.service systemd-journald.service systemd-localed.service
%post libs
%{?ldconfig}
@ -794,6 +792,19 @@ getent passwd systemd-resolve &>/dev/null || useradd -r -u 193 -l -g systemd-res
%postun resolved
%systemd_postun_with_restart systemd-resolved.service
%pre
getent group systemd-oom &>/dev/null || groupadd -r systemd-oom 2>&1 || :
getent passwd systemd-oom &>/dev/null || useradd -r -l -g systemd-oom -d / -s /sbin/nologin -c "systemd Userspace OOM Killer" systemd-oom &>/dev/null || :
%preun oomd
%systemd_preun systemd-oomd.service
%post oomd
%systemd_post systemd-oomd.service
%postun oomd
%systemd_postun_with_restart systemd-oomd.service
%global _docdir_fmt %{name}
%files -f %{name}.lang -f .file-list-rest