File git-30-b9dd70f33a124556f16dbbafc89585a82218ad61.patch of Package aaa_base.17502

From b9dd70f33a124556f16dbbafc89585a82218ad61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=BCdiger=20Oertel?= <ro@suse.de>
Date: Tue, 18 Aug 2020 14:56:16 +0200
Subject: [PATCH] backup-rpmdb: exit if zypp.pid is there and running


diff --git a/files/usr/lib/base-scripts/backup-rpmdb b/files/usr/lib/base-scripts/backup-rpmdb
index 423b703..ad10bcc 100755
--- a/files/usr/lib/base-scripts/backup-rpmdb
+++ b/files/usr/lib/base-scripts/backup-rpmdb
@@ -16,6 +16,15 @@ umask 022
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 export PATH
 
+if [ -s /var/run/zypp.pid ] ; then
+    ZYPP_PID=$(cat /var/run/zypp.pid)
+    if [ -e /proc/$ZYPP_PID ] ; then
+        echo "zypp seems to be running with pid $ZYPP_PID"
+        echo "exiting backup-rpmdb gracefully"
+        exit 0
+    fi
+fi
+
 RPMDB_PATH="/usr/lib/sysimage/rpm"
 
 #
openSUSE Build Service is sponsored by