sysrich / tik

Transactional Installation Kit
MIT License
14 stars 10 forks source link

check the by-id path for a USB stick #24

Closed TheRsKing closed 5 months ago

TheRsKing commented 5 months ago

would solve the : problem since the unix path does not contain :

not 100% sure if the code is correct

TheRsKing commented 5 months ago

the recognition of the :0 does work but not the fallback to the unix path

Help appreciated

happymab commented 5 months ago

This worked in my tests: TIK_INSTALL_DEVICE="$(readlink -f "/dev/disk/"${disk_id}"/"${result}"")"

note that it's slightly different than what I posted in the Matrix chat. It uses the ${disk_id} variable that is available.

I think this will work for the USB-disk-ids case only, not for the fallback that is in the previous code. Therefore you should probably use a separate if check for the USB case.

TheRsKing commented 5 months ago

Thanks!

happymab commented 5 months ago

Hmm, I thought your if check should be separate, outside the other fallback if clause. Didn't think it through though and didn't test myself.

TheRsKing commented 5 months ago

code unnecessary