output error message, if dracut-functions not found
authorAndreas Thienemann <andreas@bawue.net>
Tue, 19 May 2009 14:46:33 +0000 (16:46 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 19 May 2009 14:46:33 +0000 (16:46 +0200)
dracut

diff --git a/dracut b/dracut
index 4d42e82..51e18c3 100755 (executable)
--- a/dracut
+++ b/dracut
@@ -33,7 +33,13 @@ done
 [[ $modules_l ]] && modules=$modules_l
 
 [[ $allowlocal && -f dracut-functions ]] && dsrc="." || dsrc=/usr/lib/dracut
-. $dsrc/dracut-functions
+if [[ -f $dsrc/dracut-functions ]]; then
+   . $dsrc/dracut-functions
+else
+   echo "Cannot find dracut-functions. Are you running from a git checkout?"
+   echo "Try passing -l as an argument to $0"
+   exit 1
+fi
 dracutfunctions=$dsrc/dracut-functions
 export dracutfunctions