teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpmdb-rebuild.service

Panu Matilainen b07066
[Unit]
Panu Matilainen b07066
Description=RPM database rebuild
Neal Gompa 0b9f81
ConditionPathExists=/usr/lib/sysimage/rpm/.rebuilddb
Panu Matilainen b07066
Panu Matilainen b07066
# This should run before any daemons that may open the rpmdb
Panu Matilainen b07066
DefaultDependencies=no
Panu Matilainen b07066
After=sysinit.target
Panu Matilainen b07066
Before=basic.target shutdown.target
Panu Matilainen b07066
Conflicts=shutdown.target
Neal Gompa 0b9f81
# In case /usr is remote-mounted
Neal Gompa 0b9f81
RequiresMountsFor=/usr
Panu Matilainen b07066
Panu Matilainen b07066
[Service]
Panu Matilainen b07066
Type=oneshot
Panu Matilainen b07066
ExecStart=/usr/bin/rpmdb --rebuilddb
Neal Gompa 0b9f81
ExecStartPost=rm -f /usr/lib/sysimage/rpm/.rebuilddb
Panu Matilainen b07066
Panu Matilainen b07066
[Install]
Panu Matilainen b07066
WantedBy=basic.target