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
1 On Fri, 12 Jan 2018 16:42:25 +0000, Wols Lists wrote:
2
3 > Dunno quite how it works, but you could automate everything through
4 > udev. When I stick something in, KDE offers to mount it for me, in
5 > /run/media/$USER/abcd-efgh.
6 >
7 > I think that last bit is unique to the media, and the same every time,
8 > so you could make udev detect that something's been plugged in and, if
9 > it's your backup drive, auto-run the backup.
10
11 Be careful with that, because udev blocks while any RUN command is
12 executed, so make sure whatever you run detaches immediately.
13
14
15 --
16 Neil Bothwick
17
18 One-seventh of life is spent on Monday.