From 4a88aaff1006b9c9126ecfe26e0a0eb286eea211 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 18 Aug 2015 12:27:32 +0200 Subject: [PATCH] fcoe: cleanup lldpad Resolves: rhbz#1246217 (cherry picked from commit 69c437dd1c3b877f60ced307068e01619124fef4) --- modules.d/95fcoe/cleanup-fcoe.sh | 10 ++++++++++ modules.d/95fcoe/module-setup.sh | 1 + 2 files changed, 11 insertions(+) create mode 100644 modules.d/95fcoe/cleanup-fcoe.sh diff --git a/modules.d/95fcoe/cleanup-fcoe.sh b/modules.d/95fcoe/cleanup-fcoe.sh new file mode 100644 index 0000000..5ff4d05 --- /dev/null +++ b/modules.d/95fcoe/cleanup-fcoe.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +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 +fi diff --git a/modules.d/95fcoe/module-setup.sh b/modules.d/95fcoe/module-setup.sh index ae606aa..059bfde 100755 --- a/modules.d/95fcoe/module-setup.sh +++ b/modules.d/95fcoe/module-setup.sh @@ -82,6 +82,7 @@ install() { inst "$moddir/fcoe-genrules.sh" "/sbin/fcoe-genrules.sh" inst_hook pre-trigger 03 "$moddir/lldpad.sh" inst_hook cmdline 99 "$moddir/parse-fcoe.sh" + inst_hook cleanup 90 "$moddir/cleanup-fcoe.sh" dracut_need_initqueue }