UDEV issue.. USB triggers script but USB doesn't mount properly
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
On Raspbarian.
So I have the UDEV rule:
ACTION=="add", SUBSYSTEMS=="block", KERNEL=="sd[a-z]1", RUN+="/usr/local/bin/script.sh"
This is saved in /etc/udev/rules.d/10-usb.rules
I want it to trigger the script when any USB key is attached.
I am testing with 3 different USB sticks to test and have the same issue on each.
Without the UDEV rule in place (well a blank 10-usb.rules
file), the USB auto mounts fine.
With the UDEV rule in place (I use udevadm control --reload
then udevadm trigger
at each change), the script triggers (I know this because in the script I have some files being copied first on the Pi, before over to the USB)...
But the USB doesn't mount properly, hence messing up the file transfer.
Looking with tail -f /var/log/messages
I can see the USB being attached, but it stays greyed out in the top right corner of the Pi (eject devices).
Any ideas as to why the mounting issue comes into play when the UDEV rule is in place?
usb udev raspbian
add a comment |Â
up vote
0
down vote
favorite
On Raspbarian.
So I have the UDEV rule:
ACTION=="add", SUBSYSTEMS=="block", KERNEL=="sd[a-z]1", RUN+="/usr/local/bin/script.sh"
This is saved in /etc/udev/rules.d/10-usb.rules
I want it to trigger the script when any USB key is attached.
I am testing with 3 different USB sticks to test and have the same issue on each.
Without the UDEV rule in place (well a blank 10-usb.rules
file), the USB auto mounts fine.
With the UDEV rule in place (I use udevadm control --reload
then udevadm trigger
at each change), the script triggers (I know this because in the script I have some files being copied first on the Pi, before over to the USB)...
But the USB doesn't mount properly, hence messing up the file transfer.
Looking with tail -f /var/log/messages
I can see the USB being attached, but it stays greyed out in the top right corner of the Pi (eject devices).
Any ideas as to why the mounting issue comes into play when the UDEV rule is in place?
usb udev raspbian
Isn't the use of a systemd .unit and .mount file an option?
â Raman Sailopal
Jul 18 at 12:33
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
On Raspbarian.
So I have the UDEV rule:
ACTION=="add", SUBSYSTEMS=="block", KERNEL=="sd[a-z]1", RUN+="/usr/local/bin/script.sh"
This is saved in /etc/udev/rules.d/10-usb.rules
I want it to trigger the script when any USB key is attached.
I am testing with 3 different USB sticks to test and have the same issue on each.
Without the UDEV rule in place (well a blank 10-usb.rules
file), the USB auto mounts fine.
With the UDEV rule in place (I use udevadm control --reload
then udevadm trigger
at each change), the script triggers (I know this because in the script I have some files being copied first on the Pi, before over to the USB)...
But the USB doesn't mount properly, hence messing up the file transfer.
Looking with tail -f /var/log/messages
I can see the USB being attached, but it stays greyed out in the top right corner of the Pi (eject devices).
Any ideas as to why the mounting issue comes into play when the UDEV rule is in place?
usb udev raspbian
On Raspbarian.
So I have the UDEV rule:
ACTION=="add", SUBSYSTEMS=="block", KERNEL=="sd[a-z]1", RUN+="/usr/local/bin/script.sh"
This is saved in /etc/udev/rules.d/10-usb.rules
I want it to trigger the script when any USB key is attached.
I am testing with 3 different USB sticks to test and have the same issue on each.
Without the UDEV rule in place (well a blank 10-usb.rules
file), the USB auto mounts fine.
With the UDEV rule in place (I use udevadm control --reload
then udevadm trigger
at each change), the script triggers (I know this because in the script I have some files being copied first on the Pi, before over to the USB)...
But the USB doesn't mount properly, hence messing up the file transfer.
Looking with tail -f /var/log/messages
I can see the USB being attached, but it stays greyed out in the top right corner of the Pi (eject devices).
Any ideas as to why the mounting issue comes into play when the UDEV rule is in place?
usb udev raspbian
asked Jul 18 at 12:23
user10021657
1
1
Isn't the use of a systemd .unit and .mount file an option?
â Raman Sailopal
Jul 18 at 12:33
add a comment |Â
Isn't the use of a systemd .unit and .mount file an option?
â Raman Sailopal
Jul 18 at 12:33
Isn't the use of a systemd .unit and .mount file an option?
â Raman Sailopal
Jul 18 at 12:33
Isn't the use of a systemd .unit and .mount file an option?
â Raman Sailopal
Jul 18 at 12:33
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f456980%2fudev-issue-usb-triggers-script-but-usb-doesnt-mount-properly%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Isn't the use of a systemd .unit and .mount file an option?
â Raman Sailopal
Jul 18 at 12:33