Blame 0092-fcoe-cleanup-fcoe.sh-don-t-copy-shm-files-to-state.patch

Harald Hoyer 414eba
From f8242a6a60c0cf5fb0cd51261f9b6c8570dc3031 Mon Sep 17 00:00:00 2001
Harald Hoyer 414eba
From: Harald Hoyer <harald@redhat.com>
Harald Hoyer 414eba
Date: Mon, 27 Jun 2016 12:03:55 +0200
Harald Hoyer 414eba
Subject: [PATCH] fcoe/cleanup-fcoe.sh: don't copy shm files to state
Harald Hoyer 414eba
Harald Hoyer 414eba
with systemd version 230, this is not necessary anymore
Harald Hoyer 414eba
systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354
Harald Hoyer 414eba
because /dev/shm is selinux relabled.
Harald Hoyer 414eba
---
Harald Hoyer 414eba
 modules.d/95fcoe/cleanup-fcoe.sh | 10 +++++++---
Harald Hoyer 414eba
 1 file changed, 7 insertions(+), 3 deletions(-)
Harald Hoyer 414eba
Harald Hoyer 414eba
diff --git a/modules.d/95fcoe/cleanup-fcoe.sh b/modules.d/95fcoe/cleanup-fcoe.sh
Harald Hoyer 414eba
index 5ff4d05..1872156 100644
Harald Hoyer 414eba
--- a/modules.d/95fcoe/cleanup-fcoe.sh
Harald Hoyer 414eba
+++ b/modules.d/95fcoe/cleanup-fcoe.sh
Harald Hoyer 414eba
@@ -4,7 +4,11 @@
Harald Hoyer 414eba
 
Harald Hoyer 414eba
 if [ -e /var/run/lldpad.pid ]; then
Harald Hoyer 414eba
     lldpad -k
Harald Hoyer 414eba
-    mkdir -m 0755 -p /run/initramfs/state/dev/shm
Harald Hoyer 414eba
-    cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
Harald Hoyer 414eba
-    echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
Harald Hoyer 414eba
+    # with systemd version 230, this is not necessary anymore
Harald Hoyer 414eba
+    # systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354
Harald Hoyer 414eba
+    if [ -z "$DRACUT_SYSTEMD" ]; then
Harald Hoyer 414eba
+        mkdir -m 0755 -p /run/initramfs/state/dev/shm
Harald Hoyer 414eba
+        cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
Harald Hoyer 414eba
+        echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
Harald Hoyer 414eba
+    fi
Harald Hoyer 414eba
 fi