Skip to content

Commit

Permalink
Merge pull request #1034 from wipawel/osrelease
Browse files Browse the repository at this point in the history
kpatch-build: Check if /etc/os-release exists
  • Loading branch information
joe-lawrence committed Aug 28, 2019
2 parents 30a7dd6 + ed5091b commit debf44a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kpatch-build/kpatch-build
Expand Up @@ -46,6 +46,7 @@ RPMTOPDIR="$CACHEDIR/buildroot"
VERSIONFILE="$CACHEDIR/version"
TEMPDIR="$CACHEDIR/tmp"
LOGFILE="$CACHEDIR/build.log"
RELEASE_FILE=/etc/os-release
DEBUG=0
SKIPCLEANUP=0
SKIPGCCCHECK=0
Expand Down Expand Up @@ -569,8 +570,8 @@ fi
[[ -z "$TARGETS" ]] && TARGETS="vmlinux modules"

# Don't check external file.
# shellcheck disable=SC1091
source /etc/os-release
# shellcheck disable=SC1090
[[ -f "$RELEASE_FILE" ]] && source "$RELEASE_FILE"
DISTRO="$ID"
if [[ "$DISTRO" = fedora ]] || [[ "$DISTRO" = rhel ]] || [[ "$DISTRO" = ol ]] || [[ "$DISTRO" = centos ]]; then
[[ -z "$VMLINUX" ]] && VMLINUX="/usr/lib/debug/lib/modules/$ARCHVERSION/vmlinux"
Expand Down

0 comments on commit debf44a

Please sign in to comment.