[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I Use call_usermodehelper/exec_usermodehelper ?
On Tue, Dec 02, 2003 at 07:25:33PM +0000, Peter Smith wrote:
> Hi,
>
> I have a working kernel module which I would like to
> execute a Bash script under certain conditions. I`ve
> spent hours and hours and hours looking for a simple
> way to do this. Eventually I came across the commands
> "exec_usermodehelper" and "call_usermodehelper".
> However I cannot find any tutorials covering these
> commands and the only source code I have is "kmod.c"
> from the kernel (not detailed or simple enough for a
> newbie like me). Could someone please provide a
> _simple_ worked example of how to use these commands
> e.g. show me how to execute a Bash script from a
> kernel module. Any help will be much appreciated.
In 2.4 see:
drivers/usb/usb.c::call_policy_interface()
In 2.6 see:
lib/kobject.c::kset_hotplug()
Hope this helps.
greg k-h
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/