usb auto mount when nobody is logged in?

Alan Evans ame.fedora at gmail.com
Tue Nov 30 19:38:13 UTC 2010


On Tue, Nov 30, 2010 at 10:42 AM, Tom Horsley wrote:

> if mount LABEL=BACKUP /backup
> then
>   ...do backup stuff...
>   umount /backup
> fi

Wow. It's really that easy?

I did have to redirect stderr to null since I'm not interested to
getting mail from cron every time the drive is not plugged in. But
otherwise, that will probably work form me.

I presume that this is safe in the case that somebody *is* logged and
and the drive is already auto-mounted by that user in /media? My
script mounts the drive in /mnt, and it's a little weird having two
mount points for the same device, but I suppose that was intended and
properly handled by the kernel...

-Alan


More information about the users mailing list