]> git.ipfire.org Git - thirdparty/dracut.git/blame - dracut-init.sh
splitup dracut-init.sh from dracut-functions.sh
[thirdparty/dracut.git] / dracut-init.sh
CommitLineData
777f2db0
HH
1#!/bin/bash
2#
3# functions used by dracut and other tools.
4#
5# Copyright 2005-2009 Red Hat, Inc. All rights reserved.
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20export LC_MESSAGES=C
21
22if [[ $DRACUT_KERNEL_LAZY ]] && ! [[ $DRACUT_KERNEL_LAZY_HASHDIR ]]; then
23 if ! [[ -d "$initdir/.kernelmodseen" ]]; then
24 mkdir -p "$initdir/.kernelmodseen"
25 fi
26 DRACUT_KERNEL_LAZY_HASHDIR="$initdir/.kernelmodseen"
27fi
28
29if [[ $initdir ]] && ! [[ -d $initdir ]]; then
30 mkdir -p "$initdir"
31fi
32
33[[ $dracutbasedir ]] || export dracutbasedir=${BASH_SOURCE%/*}
34. $dracutbasedir/dracut-functions.sh