Make scriptlets non-failing and skip udevadm reload if no udev
sysctl, binfmt, and other rules are collected from multiple packages and we don't want to see a report that systemd %triggerin failed. So let's not silence the output, but use "|| :" to the trigger is not reported as failed. Also, adjust the udevadm check. In containers udevd might not be running, even if systemd is, and we'd get: Failed to send reload request: No such file or directory https://bugzilla.redhat.com/show_bug.cgi?id=1698391
This commit is contained in:
parent
4c67e1cb51
commit
89aa08197f
@ -62,7 +62,7 @@ fi
|
|||||||
# specified users automatically. The priority is set such that it
|
# specified users automatically. The priority is set such that it
|
||||||
# will run before the tmpfiles file trigger.
|
# will run before the tmpfiles file trigger.
|
||||||
if test -d /run/systemd/system; then
|
if test -d /run/systemd/system; then
|
||||||
%{_bindir}/systemd-sysusers
|
%{_bindir}/systemd-sysusers || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%transfiletriggerin -P 100500 -- /usr/lib/tmpfiles.d
|
%transfiletriggerin -P 100500 -- /usr/lib/tmpfiles.d
|
||||||
@ -70,35 +70,35 @@ fi
|
|||||||
# tmpfiles automatically. The priority is set such that it will run
|
# tmpfiles automatically. The priority is set such that it will run
|
||||||
# after the sysusers file trigger, but before any other triggers.
|
# after the sysusers file trigger, but before any other triggers.
|
||||||
if test -d /run/systemd/system; then
|
if test -d /run/systemd/system; then
|
||||||
%{_bindir}/systemd-tmpfiles --create
|
%{_bindir}/systemd-tmpfiles --create || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%transfiletriggerin udev -- /usr/lib/udev/hwdb.d
|
%transfiletriggerin udev -- /usr/lib/udev/hwdb.d
|
||||||
# This script will automatically invoke hwdb update if files have been
|
# This script will automatically invoke hwdb update if files have been
|
||||||
# installed or updated in /usr/lib/udev/hwdb.d.
|
# installed or updated in /usr/lib/udev/hwdb.d.
|
||||||
if test -d /run/systemd/system; then
|
if test -d /run/systemd/system; then
|
||||||
%{_bindir}/systemd-hwdb update
|
%{_bindir}/systemd-hwdb update || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%transfiletriggerin -- /usr/lib/systemd/catalog
|
%transfiletriggerin -- /usr/lib/systemd/catalog
|
||||||
# This script will automatically invoke journal catalog update if files
|
# This script will automatically invoke journal catalog update if files
|
||||||
# have been installed or updated in /usr/lib/systemd/catalog.
|
# have been installed or updated in /usr/lib/systemd/catalog.
|
||||||
if test -d /run/systemd/system; then
|
if test -d /run/systemd/system; then
|
||||||
%{_bindir}/journalctl --update-catalog
|
%{_bindir}/journalctl --update-catalog || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%transfiletriggerin udev -- /usr/lib/udev/rules.d
|
%transfiletriggerin udev -- /usr/lib/udev/rules.d
|
||||||
# This script will automatically update udev with new rules if files
|
# This script will automatically update udev with new rules if files
|
||||||
# have been installed or updated in /usr/lib/udev/rules.d.
|
# have been installed or updated in /usr/lib/udev/rules.d.
|
||||||
if test -d /run/systemd/system; then
|
if test -e /run/udev/control; then
|
||||||
%{_bindir}/udevadm control --reload
|
%{_bindir}/udevadm control --reload || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%transfiletriggerin -- /usr/lib/sysctl.d
|
%transfiletriggerin -- /usr/lib/sysctl.d
|
||||||
# This script will automatically apply sysctl rules if files have been
|
# This script will automatically apply sysctl rules if files have been
|
||||||
# installed or updated in /usr/lib/sysctl.d.
|
# installed or updated in /usr/lib/sysctl.d.
|
||||||
if test -d /run/systemd/system; then
|
if test -d /run/systemd/system; then
|
||||||
/usr/lib/systemd/systemd-sysctl
|
/usr/lib/systemd/systemd-sysctl || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%transfiletriggerin -- /usr/lib/binfmt.d
|
%transfiletriggerin -- /usr/lib/binfmt.d
|
||||||
|
Loading…
Reference in New Issue
Block a user