Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: OT: cleanup after USB backup drive unplugged?
Date: Fri, 12 Jan 2018 21:06:38
Message-Id: 20180112210616.7aaf2e72@digimed.co.uk
In Reply to: Re: [gentoo-user] Re: OT: cleanup after USB backup drive unplugged? by Wols Lists
On Fri, 12 Jan 2018 16:42:25 +0000, Wols Lists wrote:

> Dunno quite how it works, but you could automate everything through > udev. When I stick something in, KDE offers to mount it for me, in > /run/media/$USER/abcd-efgh. > > I think that last bit is unique to the media, and the same every time, > so you could make udev detect that something's been plugged in and, if > it's your backup drive, auto-run the backup.
Be careful with that, because udev blocks while any RUN command is executed, so make sure whatever you run detaches immediately. -- Neil Bothwick One-seventh of life is spent on Monday.