Possibly -- dkms is currently just su'ing to nobody, which doesn't reset any env vars. The following seems to work, though I'm not sure if something can fail for some modules as nobody's $HOME does not exist:
--- dkms.orig 2009-10-14 22:32:24.882924512 +0300 +++ dkms 2009-10-14 22:41:40.002269942 +0300 @@ -1522,8 +1522,8 @@ local the_make_command=`echo $make_command | sed "s/^make/make KERNELRELEASE=${kernelver_array[0]}/"`
#if we're root, try to run as a user instead - if [ "$USER" = "root" ] && getent passwd nobody 1>/dev/null && su nobody -c "/bin/true" 1>/dev/null; then - the_make_command="su nobody -c \"$the_make_command\"" + if [ "$USER" = "root" ] && getent passwd nobody 1>/dev/null && sudo -H -u nobody /bin/true 1>/dev/null; then + the_make_command="sudo -H -u nobody /bin/sh -c \"$the_make_command\"" chmod +x $dkms_tree/$module/$module_version/build chown -R nobody $dkms_tree/$module/$module_version/build fi
Possibly -- dkms is currently just su'ing to nobody, which doesn't reset any env vars. The following seems to work, though I'm not sure if something can fail for some modules as nobody's $HOME does not exist:
--- dkms.orig 2009-10-14 22:32:24.882924512 +0300 command= `echo $make_command | sed "s/^make/make KERNELRELEASE= ${kernelver_ array[0] }/"`
+++ dkms 2009-10-14 22:41:40.002269942 +0300
@@ -1522,8 +1522,8 @@
local the_make_
#if we're root, try to run as a user instead command= "su nobody -c \"$the_ make_command\ "" command= "sudo -H -u nobody /bin/sh -c \"$the_ make_command\ "" $module/ $module_ version/ build $module/ $module_ version/ build
- if [ "$USER" = "root" ] && getent passwd nobody 1>/dev/null && su nobody -c "/bin/true" 1>/dev/null; then
- the_make_
+ if [ "$USER" = "root" ] && getent passwd nobody 1>/dev/null && sudo -H -u nobody /bin/true 1>/dev/null; then
+ the_make_
chmod +x $dkms_tree/
chown -R nobody $dkms_tree/
fi