[mythtv-users] usb mount

Hika van den Hoven hikavdh at gmail.com
Mon Jan 1 15:47:21 UTC 2024


Hoi James,

Monday, January 1, 2024, 3:29:30 PM, you wrote:



>> On Jan 1, 2024, at 18:08, Hika van den Hoven <hikavdh at gmail.com> wrote:
>> 
>> PartLabel=`blkid -o value -s LABEL /dev/${kernel}`

> Boot with USB plugged in does not generate a udev event (which might be the original problem !

> This works

> [Unit]
> Description=Mount /Store
> After=online.target
> Wants=apache2.service
> Wants=network-online.target

> [Service]
> Type=simple
> ExecStartPre=bash -c "while [ ! -b /dev/disk/by-label/MYTHTV ]; do sleep 1; done"
> ExecStart=mount /dev/disk/by-label/MYTHTV /store

> [Install]
> WantedBy=multi-user.target

> James
> _______________________________________________

I realized this later that my udev rule uses ACTION=="add". It was
long ago I wrote this to make a drive mount at my place of choosing,
but you probably can substitute the action. 
I searched and as far as I see it can be add, change or remove. But
possibly there is other more extensive syntax involved in getting it
to work at boot time.

SUBSYSTEM=="block", \
        SUBSYSTEMS=="usb", \
        KERNEL=="sd?1", \
        ACTION=="change", \
        RUN+="/root/mount-usb.sh $kernel"




Tot mails,
  Hika                            mailto:hikavdh at gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens



More information about the mythtv-users mailing list