Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions dracut-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
devkontrol marked this conversation as resolved.
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
Expand Down
2 changes: 1 addition & 1 deletion src/install/dracut-install.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading