mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-20 17:32:15 +00:00
68df4daaa9
dracut SOURCES a hook: source_all runs `. "$f" "$@"`. An `exit` in the hook therefore ends networkd-run.sh, which is the script bringing the network up, so the early return path would stop network setup on the second interface. A compute node with three nics on the provisioning network reaches that path. The hook leaves with `return` now. A case sources it with the marker already present and asserts the caller still runs; putting `exit` back fails only that case. Two cases drove the hook with `sh hook.sh` and now source it, which is both what dracut does and what `return` requires. dracut's own 98syslog/rsyslogd-start.sh uses `exit` in an online hook, so the convention is not uniform. `return` is correct for a sourced script and says what is meant: end this hook, not its caller. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>