From b0706603296a0ca9188ee26d2696f745b1a9b50d Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 22 Apr 2020 12:18:02 +0300 Subject: [PATCH] Remember to actually add the .service file, doh... Should've been in commit c091c2fcdcd40897604c45fa51720746703d2a5b --- rpmdb-rebuild.service | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 rpmdb-rebuild.service diff --git a/rpmdb-rebuild.service b/rpmdb-rebuild.service new file mode 100644 index 0000000..0580adb --- /dev/null +++ b/rpmdb-rebuild.service @@ -0,0 +1,19 @@ +[Unit] +Description=RPM database rebuild +ConditionPathExists=/var/lib/rpm/.rebuilddb + +# This should run before any daemons that may open the rpmdb +DefaultDependencies=no +After=sysinit.target +Before=basic.target shutdown.target +Conflicts=shutdown.target +# In case /var is remote-mounted +RequiresMountsFor=/var + +[Service] +Type=oneshot +ExecStart=/usr/bin/rpmdb --rebuilddb +ExecStartPost=rm -f /var/lib/rpm/.rebuilddb + +[Install] +WantedBy=basic.target