diff --git a/dracut-functions.sh b/dracut-functions.sh index 39a2767149..6dfbe87c4c 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -1150,15 +1150,24 @@ inst_script() { inst_simple() { local dstdir="${dstdir:-"$initdir"}" local _ret _hostonly_install - if [[ $1 == "-H" ]] && [[ $hostonly ]]; then - _hostonly_install="-H" - shift + if [[ $1 == "-H" ]]; then + if [[ $hostonly ]]; then + _hostonly_install="-H" + shift + else + ddebug "skipping install of '$2', not in hostonly mode" + return 0 + fi fi [[ -e ${dstdir}/"${2:-$1}" ]] && return 0 # already there if [[ $1 == /* ]]; then - [[ -e ${dracutsysrootdir-}/${1#"${dracutsysrootdir-}"} ]] || return 1 # no source - else - [[ -e $1 ]] || return 1 # no source + if [[ ! -e ${dracutsysrootdir-}/${1#"${dracutsysrootdir-}"} ]]; then + dwarn "no source: '$1'!" + return 1 + fi + elif [[ ! -e $1 ]]; then + dwarn "no source: '$1'!" + return 1 fi if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${dstdir:+-D "$dstdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"; then return 0 diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c index a3f0cdb7c4..b9409e0d31 100644 --- a/src/install/dracut-install.c +++ b/src/install/dracut-install.c @@ -1431,7 +1431,7 @@ static int dracut_install(const char *orig_src, const char *orig_dst, bool isdir if (!hash_path) return -ENOMEM; hashmap_put(items_failed, hash_path, hash_path); - /* src does not exist */ + log_debug("src does not exist: '%s'; fullsrcpath: '%s'", src, fullsrcpath); return 1; } } else {