diff --git a/srcpkgs/dkms/files/kernel.d/dkms.postinst b/srcpkgs/dkms/files/kernel.d/dkms.postinst index 5cfc630de1c..ef2a10bac28 100644 --- a/srcpkgs/dkms/files/kernel.d/dkms.postinst +++ b/srcpkgs/dkms/files/kernel.d/dkms.postinst @@ -8,7 +8,7 @@ PKGNAME="$1" VERSION="$2" ARCH=$(uname -m) -if [ ! -x /usr/sbin/dkms ]; then +if [ ! -x /usr/bin/dkms ]; then exit 0 fi @@ -59,16 +59,16 @@ while [ $# -gt 1 ]; do # If adding a module, depmod is necessary unless dkms runs it do_depmod="yes" - status=$(dkms status -m ${module} -v ${modulever} -k ${VERSION}) + status=$(/usr/bin/dkms status -m ${module} -v ${modulever} -k ${VERSION}) if [ $(echo "$status"|grep -c ": built") -eq 0 ]; then # Check if the module is still there. - if [ ! -f usr/src/${module}-${modulever}/dkms.conf ]; then + if [ ! -f /usr/src/${module}-${modulever}/dkms.conf ]; then echo "Skipping nonexistent DKMS module: ${module}-${modulever}." continue fi # Build the module echo -n "Building DKMS module: ${module}-${modulever}... " - dkms build -q -m ${module} -v ${modulever} -k ${VERSION} -a ${ARCH} + /usr/bin/dkms build -q -m ${module} -v ${modulever} -k ${VERSION} -a ${ARCH} rval=$? # If the module was skipped or failed, go to the next module. if [ $rval -eq 0 ]; then @@ -80,14 +80,14 @@ while [ $# -gt 1 ]; do echo "FAILED!" continue fi - status=$(dkms status -m ${module} -v ${modulever} -k ${VERSION}) + status=$(/usr/bin/dkms status -m ${module} -v ${modulever} -k ${VERSION}) fi # If the module is built (either pre-built or just now), install it if [ $(echo "$status"|grep -c ": built") -eq 1 ] && [ $(echo "$status"|grep -c ": installed") -eq 0 ]; then echo -n "Installing DKMS module: ${module}-${modulever}... " - dkms install -q -m ${module} -v ${modulever} -k ${VERSION} -a ${ARCH} + /usr/bin/dkms install -q -m ${module} -v ${modulever} -k ${VERSION} -a ${ARCH} rval=$? # If the module failed installation, go to the next module. if [ $rval -eq 0 ]; then @@ -101,16 +101,18 @@ while [ $# -gt 1 ]; do fi done -if [ -n "$do_depmod" ]; then - echo -n "Generating kernel module dependency lists... " - depmod -a ${VERSION} - rval=$? - if [ $rval -eq 0 ]; then - echo "done." - else - echo "FAILED!" - exit $rval - fi +if [ -z "$do_depmod" ] || [ ! -x /usr/bin/depmod ]; then + exit 0 +fi + +echo -n "Generating kernel module dependency lists... " +/usr/bin/depmod -a ${VERSION} +rval=$? +if [ $rval -eq 0 ]; then + echo "done." +else + echo "FAILED!" + exit $rval fi exit 0 diff --git a/srcpkgs/dkms/files/kernel.d/dkms.prerm b/srcpkgs/dkms/files/kernel.d/dkms.prerm index 0307e895311..155e9734aee 100644 --- a/srcpkgs/dkms/files/kernel.d/dkms.prerm +++ b/srcpkgs/dkms/files/kernel.d/dkms.prerm @@ -4,14 +4,14 @@ PKGNAME="$1" VERSION="$2" -if [ -x /usr/sbin/dkms ]; then +if [ -x /usr/bin/dkms ]; then while read line; do name=`echo "$line" | awk '{print $1}' | sed 's/,$//'` vers=`echo "$line" | awk '{print $2}' | sed 's/,$//'` arch=`echo "$line" | awk '{print $4}' | sed 's/:$//'` echo "dkms: removing: $name $vers (${PKGNAME}-${VERSION}) ($arch)" >&2 - dkms remove -q -m $name -v $vers -k ${VERSION} -a $arch -done < <(dkms status -k ${VERSION} 2>/dev/null | grep ": installed") + /usr/bin/dkms remove -q -m $name -v $vers -k ${VERSION} -a $arch +done < <(/usr/bin/dkms status -k ${VERSION} 2>/dev/null | grep ": installed") fi rmdir \ diff --git a/srcpkgs/dkms/template b/srcpkgs/dkms/template index 4365bc5a7d7..f6b5035e8a0 100644 --- a/srcpkgs/dkms/template +++ b/srcpkgs/dkms/template @@ -1,7 +1,7 @@ # Template file for 'dkms' pkgname=dkms version=2.8.3 -revision=1 +revision=2 conf_files="/etc/dkms/framework.conf" depends="bash kmod gcc make coreutils linux-headers" short_desc="Dynamic Kernel Modules System"