Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script not triggered on service restarts #3

Open
MCFurry opened this issue Jun 15, 2021 · 1 comment
Open

script not triggered on service restarts #3

MCFurry opened this issue Jun 15, 2021 · 1 comment

Comments

@MCFurry
Copy link

MCFurry commented Jun 15, 2021

While this is a nice example that works pretty well, it seems not to work on service restarts while a usb drive is still inserted.

Probably because there is no ACTION=="add" triggered then?

Would it make sense to change the trigger to something like KERNEL=="sd[b-z][0-9]" such that it also works on service restarts? (But excludes the Balena OS partitions)?

@maggie44
Copy link

maggie44 commented Aug 29, 2022

You could also try a different trigger in the UDEV script:

udevadm trigger --action add --subsystem-match=block --type=devices --property=DEVTYPE=partition > /dev/null 2>&1

You would need to filter the mounts though by those staring with sd in the mount.sh script.

How did the KERNEL version work out? If it proves viable we could explore it further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants