public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [tests/selinux] pr775-checkpolicy-revdeps: check if mcstrans is present before stopping it
@ 2026-09-11 13:17 Jan Zarsky
  0 siblings, 0 replies; only message in thread
From: Jan Zarsky @ 2026-09-11 13:17 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : tests/selinux
            Branch : pr775-checkpolicy-revdeps
            Commit : 99e17a3bd10dd61a18beff0e92f33b1776977b3e
            Author : Jan Zarsky <jzarsky@redhat.com>
            Date   : 2018-10-15T10:49:41+02:00
            Stats  : +10/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/tests/selinux/c/99e17a3bd10dd61a18beff0e92f33b1776977b3e?branch=pr775-checkpolicy-revdeps

            Log:
            check if mcstrans is present before stopping it

Check if the mcstrans or mcstransd binaries are present. This prevents
unnecessary warnings.

---
diff --git a/policycoreutils/restorecon/runtest.sh b/policycoreutils/restorecon/runtest.sh
index aa7570c..9ab71d7 100755
--- a/policycoreutils/restorecon/runtest.sh
+++ b/policycoreutils/restorecon/runtest.sh
@@ -35,7 +35,11 @@ PACKAGE="policycoreutils"
 rlJournalStart
     rlPhaseStartSetup
         rlAssertRpm ${PACKAGE}
-        rlServiceStop mcstrans mcstransd
+        if which mcstrans; then
+            rlServiceStop mcstrans
+        elif which mcstransd; then
+            rlServiceStop mcstransd
+        fi
         rlRun "rpm -qf `which restorecon` | grep ${PACKAGE}"
         rlRun "setenforce 1"
         rlRun "sestatus"
@@ -363,7 +367,11 @@ EOF"
     fi
 
     rlPhaseStartCleanup
-        rlServiceRestore mcstrans mcstransd
+        if which mcstrans; then
+            rlServiceRestore mcstrans
+        elif which mcstransd; then
+            rlServiceRestore mcstransd
+        fi
     rlPhaseEnd
     rlJournalPrintText
 rlJournalEnd

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-11 13:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 13:17 [tests/selinux] pr775-checkpolicy-revdeps: check if mcstrans is present before stopping it Jan Zarsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox