PR: 274977
MFC after: 1 month
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 54805 Build 51694: arc lint + arc unit
Event Timeline
See the PR where I go into details on why the OP had the failure. This "works as inteneded" without this change. Note to say that I wouldnt accept a carefully coded if [ -x block that would do the right things in most instances, including adding an error handling if neither tar exists.
Warner, does the protection added by my enhancements to this change meet your criteria of keeping it such that /usr does not become a requirement, thus reducing your concerns on that manner.
/rescue/tar is a requirement. What's wrong with that? the whole bug is because someone tried to grab the wrong image to start with and there's going to be way more than just this one detail wrong with the running system.
I don't like the code repetition. It over engineers a solution to a non-problem.
I think it's a bad change, done for bad reasons and will have unintended consequences down stream.
Honestly, a better solution is just to put /rescue in the path. That way we don't have to special case it and anything not available will use it. If something doesn't exist, you'll get an error message, just like anything else that fails (and maybe the failure mode is too harsh and we should do something about that, but that's a different bug).
libexec/rc/rc.initdiskless | ||
---|---|---|
364 | +PATH=${PATH}:/rescue | |
379–390 | - (cd / ; /rescue/tar -xpf $j) + (cd / ; tar -xpf $j) |
The use-case here is different and not exactly the same as in the "network-diskless" in the handbook. The ISO is not used as a diskless boot image, but literally an installation image.
Please refer to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274977#c12
This is committed in https://cgit.freebsd.org/src/commit/?id=93b7818226cf5270646725805b4a8c17a1ad3761
Manually close this review.