Blame 0052-dracut-functions.sh-bail-out-if-initdir-is-not-set.patch

cc894b9
From 593b315c700641496e89133918b97c1ad019c8ce Mon Sep 17 00:00:00 2001
cc894b9
From: Harald Hoyer <harald@redhat.com>
cc894b9
Date: Mon, 9 Jul 2012 10:02:04 +0200
cc894b9
Subject: [PATCH] dracut-functions.sh: bail out, if $initdir is not set
cc894b9
cc894b9
---
cc894b9
 dracut-functions.sh |    5 +++++
cc894b9
 1 file changed, 5 insertions(+)
cc894b9
cc894b9
diff --git a/dracut-functions.sh b/dracut-functions.sh
cc894b9
index d91e2a4..3f56316 100755
cc894b9
--- a/dracut-functions.sh
cc894b9
+++ b/dracut-functions.sh
cc894b9
@@ -96,6 +96,11 @@ if ! type dinfo >/dev/null 2>&1; then
cc894b9
     dlog_init
cc894b9
 fi
cc894b9
 
cc894b9
+if ! [[ $initdir ]]; then
cc894b9
+    dfatal "initdir not set"
cc894b9
+    exit 1
cc894b9
+fi
cc894b9
+
cc894b9
 # export standard hookdirs
cc894b9
 [[ $hookdirs ]] || {
cc894b9
     hookdirs="cmdline pre-udev pre-trigger netroot "