mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
test: check for binariers in [usr/][s]bin
The image build function greps for ExecStart lines in unit files, but some of them (eg: systemd-firstboot) do not use a full path. It then falls back to 'type -P' but that only works if you have the binary installed. For optional binaries like systemd-firstboot, the installation can then fail. Manually check if the binary already exists in /[usr/][s]bin.
This commit is contained in:
parent
53a1c94480
commit
0515e4c17d
@ -1575,7 +1575,7 @@ inst_binary() {
|
|||||||
# In such cases, let's check if the binary indeed exists in the image
|
# In such cases, let's check if the binary indeed exists in the image
|
||||||
# before doing any other chcecks. If it does, immediately return with
|
# before doing any other chcecks. If it does, immediately return with
|
||||||
# success.
|
# success.
|
||||||
[[ $# -eq 1 && -e $initdir/$1 ]] && return 0
|
[[ $# -eq 1 && -e $initdir/$1 || -e $initdir/bin/$1 || -e $initdir/sbin/$1 || -e $initdir/usr/bin/$1 || -e $initdir/usr/sbin/$1 ]] && return 0
|
||||||
|
|
||||||
_bin=$(find_binary "$1") || return 1
|
_bin=$(find_binary "$1") || return 1
|
||||||
_target=${2:-$_bin}
|
_target=${2:-$_bin}
|
||||||
|
Loading…
Reference in New Issue
Block a user