#1988 PR merged
: Removed file command usage in 400_guess_kernel.sh because it is not reliably working to test if a file is actually a kernel¶
Labels: bug
, fixed / solved / done
jsmeix opened issue at 2018-11-30 10:39:¶
-
Type: Regression Fix
-
Impact: High
-
Reference to related issue (URL):
https://github.com/rear/rear/pull/1985#issuecomment-443157197 -
How was this pull request tested?
On my openSUSE Leap 15.0 (SLES12-like) system -
Brief description of the changes in this pull request:
Basically I reverted the main part of
https://github.com/rear/rear/pull/1985/commits/8b39c585c502be19d41b64d9530f661fcc6bf6c2
i.e. we do no longer callfile
to verify if the KERNEL_FILE
variable actually contains a 'kernel' file so that now e.g.
KERNEL_FILE="/etc/os-release"
"just works" again (ReaR obeys user's commandments) as it did in
https://github.com/rear/rear/pull/1985#discussion_r237451729
see there for the reasoning why.
jsmeix commented at 2018-11-30 10:42:¶
By the way I simplified the code: Less if
conditions actually
needed.
My personal preference is to avoid nested code when possible
cf. "Return early, return often" in
https://github.com/rear/rear/wiki/Coding-Style
[Export of Github issue for rear/rear.]