UDEV issue.. USB triggers script but USB doesn't mount properly

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question



















  • Isn't the use of a systemd .unit and .mount file an option?
    – Raman Sailopal
    Jul 18 at 12:33
















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?







share|improve this question



















  • Isn't the use of a systemd .unit and .mount file an option?
    – Raman Sailopal
    Jul 18 at 12:33












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?







share|improve this question











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?









share|improve this question










share|improve this question




share|improve this question









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
















  • 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















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















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



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














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













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay