1
I have a pretty simple udev
rule which is executed when a USB is plugged into my Debian machine:
SUBSYSTEMS=="usb", KERNEL=="sd?", ACTION=="add", RUN+="/usr/local/bin/USB/t.sh \
%k"
My t.sh
is also pretty simple and it does two things:
- Prints helloworld in
udev.out
to Desktop - Loads
foo.ko
module into kernel with simpleinsmod foo.ko
Or concretely, t.sh
is:
#!/bin/bash
echo 'Hello World!' >>"/home/salman/Desktop/udev.out"
insmod helloworld.ko
exit
When I plug in my USB, udev.out
is correctly printed on Desktop but the following line insmod helloworld.ko
fails to load the module in the kernel.
I checked with lsmod | grep helloworld
but it doesn't show helloworld
loaded into kernel.
I am running a Debian machine inside Virtual Box.