output error message, if dracut-functions not found

master
Andreas Thienemann 2009-05-19 16:46:33 +02:00 committed by Harald Hoyer
parent 9b4191d065
commit adbc8a42b6
1 changed files with 7 additions and 1 deletions

8
dracut
View File

@ -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