From f8242a6a60c0cf5fb0cd51261f9b6c8570dc3031 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Mon, 27 Jun 2016 12:03:55 +0200 Subject: [PATCH] fcoe/cleanup-fcoe.sh: don't copy shm files to state with systemd version 230, this is not necessary anymore systemd commit cacf980ed44a28e276a6cc7f8fc41f991e2ab354 because /dev/shm is selinux relabled. --- modules.d/95fcoe/cleanup-fcoe.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules.d/95fcoe/cleanup-fcoe.sh b/modules.d/95fcoe/cleanup-fcoe.sh index 5ff4d05..1872156 100644 --- a/modules.d/95fcoe/cleanup-fcoe.sh +++ b/modules.d/95fcoe/cleanup-fcoe.sh @@ -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