summaryrefslogtreecommitdiffstats
path: root/0014-network-fcoe-only-redirect-output-to-loginit.pipe-if.patch
blob: 132e5f1c39e217a121cdb20d1cffd510452f93d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 879546753341a9b2b1ad391a14ebe9fd3f6c27c4 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 16 Oct 2013 11:39:34 +0200
Subject: [PATCH] network/fcoe: only redirect output to loginit.pipe, if exists

---
 modules.d/40network/dhclient-script.sh | 2 +-
 modules.d/95fcoe/fcoe-up.sh            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules.d/40network/dhclient-script.sh b/modules.d/40network/dhclient-script.sh
index 07c3d9b..af483ac 100755
--- a/modules.d/40network/dhclient-script.sh
+++ b/modules.d/40network/dhclient-script.sh
@@ -48,7 +48,7 @@ setup_interface() {
 PATH=/usr/sbin:/usr/bin:/sbin:/bin
 
 export PS4="dhclient.$interface.$$ + "
-exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe
+[ -e /run/initramfs/loginit.pipe ] && exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe
 type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
 type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh
 
diff --git a/modules.d/95fcoe/fcoe-up.sh b/modules.d/95fcoe/fcoe-up.sh
index ecb1593..8cf39ec 100755
--- a/modules.d/95fcoe/fcoe-up.sh
+++ b/modules.d/95fcoe/fcoe-up.sh
@@ -14,7 +14,7 @@ PATH=/usr/sbin:/usr/bin:/sbin:/bin
 [ -z "$1" -o -z "$2" ] && exit 1
 
 export PS4="fcoe-up.$1.$$ + "
-exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe
+[ -e /run/initramfs/loginit.pipe ] && exec >>/run/initramfs/loginit.pipe 2>>/run/initramfs/loginit.pipe
 type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
 type ip_to_var >/dev/null 2>&1 || . /lib/net-lib.sh