]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fcoe/cleanup-fcoe.sh: don't copy shm files to state
authorHarald Hoyer <harald@redhat.com>
Mon, 27 Jun 2016 10:03:55 +0000 (12:03 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 27 Jun 2016 10:03:55 +0000 (12:03 +0200)
with systemd version 230, this is not necessary anymore
systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354
because /dev/shm is selinux relabled.

modules.d/95fcoe/cleanup-fcoe.sh

index 5ff4d054c67310e7e247e3e3e6e15e68ca9762ca..1872156ec52b942a03811056555042d94726ecb2 100644 (file)
@@ -4,7 +4,11 @@
 
 if [ -e /var/run/lldpad.pid ]; then
     lldpad -k
-    mkdir -m 0755 -p /run/initramfs/state/dev/shm
-    cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
-    echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
+    # with systemd version 230, this is not necessary anymore
+    # systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354
+    if [ -z "$DRACUT_SYSTEMD" ]; then
+        mkdir -m 0755 -p /run/initramfs/state/dev/shm
+        cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1
+        echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab
+    fi
 fi