3 . /etc/triggerhappy/scriptenv.conf
5 if [ -e $LAST_PRESSED ]; then
6 seconds=$(($(date +%s) - $(date +%s -r $LAST_PRESSED)))
11 if [ $seconds -lt 3 ]; then
15 for dev in /media/usb*; do
17 if [ ! -L $dev ]; then
19 blkdev=`findmnt -nr $dev | awk '{ print $2; }'`
20 if [ "$blkdev" != "" ]; then
22 label=`blkid -s LABEL -o value $blkdev`
23 uuid=`blkid -s UUID -o value $blkdev`
24 if [ "$label" != "" ]; then
25 dirname="$uuid ($label)"
30 dir="$DIR_BASE/$dirname"
34 rsync -rv "$dev" "$dir" --exclude="lost+found"