diff --git a/test/test-functions b/test/test-functions index a1d9e5c953a..f1646b3bcff 100644 --- a/test/test-functions +++ b/test/test-functions @@ -505,9 +505,8 @@ install_execs() { export PKG_CONFIG_PATH=$BUILD_DIR/src/core/ systemdsystemunitdir=$(pkg-config --variable=systemdsystemunitdir systemd) systemduserunitdir=$(pkg-config --variable=systemduserunitdir systemd) - egrep -ho '^Exec[^ ]*=[^ ]+' $initdir/{$systemdsystemunitdir,$systemduserunitdir}/*.service \ - | while read i; do - i=${i##Exec*=}; i=${i##[@+\!-]}; i=${i##\!} + sed -r -n 's|^Exec[a-zA-Z]*=[@+!-]*([^ ]+).*|\1|gp' $initdir/{$systemdsystemunitdir,$systemduserunitdir}/*.service \ + | sort -u | while read i; do # some {rc,halt}.local scripts and programs are okay to not exist, the rest should inst $i || [ "${i%.local}" != "$i" ] || [ "${i%systemd-update-done}" != "$i" ] done