dracut-functions: try to find dracutbasedir, if not set

master
Harald Hoyer 2011-03-25 15:40:51 +01:00
parent d6d53f60b2
commit 0874654c78
1 changed files with 7 additions and 0 deletions

View File

@ -20,6 +20,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

if ! [[ $dracutbasedir ]]; then
dracutbasedir=${BASH_SOURCE[0]%/*}
[[ $dracutbasedir = "dracut-functions" ]] && dracutbasedir="."
[[ $dracutbasedir ]] || dracutbasedir="."
dracutbasedir="$(readlink -f $dracutbasedir)"
fi

if ! type dinfo >/dev/null 2>&1; then
. "$dracutbasedir/dracut-logger"
dlog_init