From: Andreas Thienemann Date: Tue, 19 May 2009 14:46:33 +0000 (+0200) Subject: output error message, if dracut-functions not found X-Git-Tag: 0.1~243 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=adbc8a42b6f4fd281845148b29956200a9ea1f3e;p=thirdparty%2Fdracut-ng.git output error message, if dracut-functions not found --- diff --git a/dracut b/dracut index 4d42e8278..51e18c384 100755 --- 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