Re: USB event triggern - war: Treffen 27.7.22

Gerd G <[email protected]>
Newsgroups gmane.user-groups.linux.dresden
Message-ID <[email protected]>
Am Mittwoch, dem 27.07.2022 um 12:58 +0200 schrieb Bernhard Schiffner:
> BTW:

Hallo Bernhard,
>
> Hat schon mal jemand so was gemacht:
> - eine bestimmte (UUID) USB-Festplatte wird in den Rechner eingesteckt,
> - fsck falls s.u. daneben ging
> - backup (als user X) läuft automatisch los,
> - danach wird die Platte "umounted" und
> - eine email wird verschickt
>
> Den backup-Teil habe ich schon, aber wenn ich "das Umfeld" kriegen könnte: das wäre 'ne Zeitersparnis für mich.

- packe alles in ein Skript (usb-backup-script)
 UUID prüfen - ok 
 weitere aktionen
 ...

- beim anschalten das USB Event triggern und das Skript starten 

z.B.: mittels Eintrag in

/etc/udev/rules.d/60-local_usb.rules
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="....", ATTRS{idProduct}=="....", RUN+="$PATH/usb-backup-script"

Hat eventuell jemand eine andere Idee ?

VG Gerd 

P.S.: - bin heute nicht mit in der Torwirtschaft

>
> Bis heute abend!
> Bernhard
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.