2020-04-22 09:18:02 +00:00
|
|
|
[Unit]
|
|
|
|
Description=RPM database rebuild
|
2022-01-27 01:14:39 +00:00
|
|
|
ConditionPathExists=/usr/lib/sysimage/rpm/.rebuilddb
|
2020-04-22 09:18:02 +00:00
|
|
|
|
|
|
|
# This should run before any daemons that may open the rpmdb
|
|
|
|
DefaultDependencies=no
|
|
|
|
After=sysinit.target
|
|
|
|
Before=basic.target shutdown.target
|
|
|
|
Conflicts=shutdown.target
|
2022-01-27 01:14:39 +00:00
|
|
|
# In case /usr is remote-mounted
|
|
|
|
RequiresMountsFor=/usr
|
2020-04-22 09:18:02 +00:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
|
|
|
ExecStart=/usr/bin/rpmdb --rebuilddb
|
2022-01-27 01:14:39 +00:00
|
|
|
ExecStartPost=rm -f /usr/lib/sysimage/rpm/.rebuilddb
|
2020-04-22 09:18:02 +00:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=basic.target
|