if [[ -e "${src%/*}/.${src##*/}.hmac" ]]; then
inst "${src%/*}/.${src##*/}.hmac" "${target%/*}/.${target##*/}.hmac"
fi
- dinfo "Installing $src"
+ ddebug "Installing $src"
cp -pfL "$src" "${initdir}$target"
}
# Create additional symlinks. See rev_symlinks description.
for symlink in $(rev_lib_symlinks $src) $(rev_lib_symlinks $reallib); do
[[ ! -e $initdir$symlink ]] && {
- dinfo "Creating extra symlink: $symlink"
+ ddebug "Creating extra symlink: $symlink"
inst_symlink $symlink
}
done
LC_ALL=C ldd $bin 2>/dev/null | while read line; do
[[ $line = 'not a dynamic executable' ]] && return 1
if [[ $line =~ not\ found ]]; then
- derror "Missing a shared library required by $bin."
- derror "Run \"ldd $bin\" to find out what it is."
- derror "dracut cannot create an initrd."
+ dfatal "Missing a shared library required by $bin."
+ dfatal "Run \"ldd $bin\" to find out what it is."
+ dfatal "dracut cannot create an initrd."
exit 1
fi
so_regex='([^ ]*/lib[^/]*/[^ ]*\.so[^ ]*)'
[[ $initdir = $2 ]] && set $1;;
3) [[ -z $initdir ]] && export initdir=$2
set $1 $3;;
- *) derror "inst only takes 1 or 2 or 3 arguments"
+ *) dfatal "inst only takes 1 or 2 or 3 arguments"
exit 1;;
esac
for x in inst_symlink inst_script inst_binary inst_simple; do
# All hooks should be POSIX/SuS compliant, they will be sourced by init.
inst_hook() {
if ! [[ -f $3 ]]; then
- derror "Cannot install a hook ($3) that does not exist."
- derror "Aborting initrd creation."
+ dfatal "Cannot install a hook ($3) that does not exist."
+ dfatal "Aborting initrd creation."
exit 1
elif ! strstr "$hookdirs" "$1"; then
- derror "No such hook type $1. Aborting initrd creation."
+ dfatal "No such hook type $1. Aborting initrd creation."
exit 1
fi
inst_simple "$3" "/lib/dracut/hooks/${1}/${2}${3##*/}"
while (($# > 0)); do
if ! inst "$1" ; then
if [[ $optional = yes ]]; then
- dwarning "Skipping program $1 as it cannot be found and is flagged to be optional"
+ dwarn "Skipping program $1 as it cannot be found and is" \
+ "flagged to be optional"
else
- derror "Failed to install $1"
+ dfatal "Failed to install $1"
exit 1
fi
fi
for mod in $modcheck; do
strstr "$mods_to_load" "$mod" && continue
strstr "$omit_dracutmodules" "$mod" && continue
- dwarning "Dracut module \"$mod\" cannot be found."
+ derror "Dracut module \"$mod\" cannot be found."
done
}
fi
done
if [[ $found != yes ]]; then
- dinfo "Possible missing firmware \"${fw}\" for kernel module \"${mod}.ko\""
+ dwarn "Possible missing firmware \"${fw}\" for kernel module" \
+ "\"${mod}.ko\""
fi
done
return 0