Re: lsmod path hardcoded in v4l/Makefile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Em Tue, 21 Jul 2009 09:14:36 +0200
Matthias Schwarzott <zzam@xxxxxxxxxx> escreveu:

 
> Hi Mauro!
> 
> is there any reason to not pull this besides time?

Time is one reason, however, there's another:

It is not a good idea to run as root. Most people compile everything
with a normal user and then use "sudo" command to install/remove/insert
modules. Unfortunately, depending on the distribution, sudo inherits PATH from
the normal user, instead of root. Due to that, if you replace it for just
lsmod, it will fail for people that don't use gentoo.

Maybe good solution is to test if lsmod (and other similar tools) are at /sbin
or /usr/sbin. 

Alternatively, we can try to replace lsmod by something like (untested):

v4l_modules := $(shell PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin lsmod|cut -d' ' -f1 ) $(patsubst %.ko,%,$(inst-m))

> 
> Regards
> Matthias
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html




Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux