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

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