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

Run command after automount #285

Open
coldfix opened this issue Apr 17, 2024 · 3 comments
Open

Run command after automount #285

coldfix opened this issue Apr 17, 2024 · 3 comments

Comments

@coldfix
Copy link
Owner

coldfix commented Apr 17, 2024

But I'm trying to make it do
things outside its design: when a USB stick containing a filesystem with
specific UUIDs is inserted, I want it to automount, then autorun a specific
command ("/usr/local/bin/make-backup" :-). I've got a patch that adds
that functionality, but it's a bit invasive, so I'm not sure if you'd want it.

I should also see if I can have it autorun a command when a disk is inserted
into the optical drive. Ideally it would run different commands based on
the medium type:
blank: run make-backup
audio cd: extract all the tracks and convert them to .mp3
dvd: run vlc
cd-rom: mount the filesystem
etc. But that might require lots of changes to the udiskie config syntax.

	-- JF

Originally posted by @dajt1725 in #284 (comment)

@coldfix
Copy link
Owner Author

coldfix commented Apr 17, 2024

Let's continue this discussion in a separate issue.

What you describe sounds similar to what --event_hook provides. Does that not solve your issue?

I've got a patch that adds
that functionality, but it's a bit invasive, so I'm not sure if you'd want it.

If you already did the work, feel free to submit it as a PR. If I don't like it, I can reject or propose improvements. If you haven't put in the work yet, might be good to coordinate.

@coldfix
Copy link
Owner Author

coldfix commented Apr 24, 2024

Hi @dajt1725, I pulled your comment over into this new issue. Let me know if this is something that you want to follow up on, otherwise, we could just close it.

@dajt1725
Copy link
Contributor

dajt1725 commented Apr 25, 2024 via email

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