Message ID | 20220617150056.74671-3-dimitri.ledkov@canonical.com |
---|---|
State | New |
Headers | show |
Series | Cherry-pick missing dkms fixes | expand |
diff --git a/debian/scripts/dkms-build b/debian/scripts/dkms-build index 9d78fc60e6..d9b580c6a7 100755 --- a/debian/scripts/dkms-build +++ b/debian/scripts/dkms-build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -e dkms_dir="$1" @@ -159,7 +159,7 @@ dkms_version=$( sed -ne 's/PACKAGE_VERSION="\(.*\)"/\1/p' "$dkms_conf" ) # Build the DKMS binaries. echo "II: dkms-build building $package" fakeroot="" -[[ $EUID -ne 0 ]] && fakeroot="/usr/bin/fakeroot" +[ $(id -u) -ne 0 ] && fakeroot="/usr/bin/fakeroot" rc=0 $fakeroot /usr/sbin/dkms build --no-prepare-kernel --no-clean-kernel \ -k "$abi_flavour" \