xibosignage / xibo-linux

Xibo for Linux - Digital Signage Player
https://xibo.org.uk/xibo-for-linux
GNU Affero General Public License v3.0
77 stars 58 forks source link

fix: add current drive detection xibosignage#238 #239

Closed Stivius closed 3 years ago

Stivius commented 3 years ago

The problem was that I'd always used harcoded /dev/sda as a main device where the player should be stored. This is wrong at least for 2 reasons:

  1. Player can be saved on a flash drive (which can be /dev/sdb or something else)
  2. /dev/sda is not always the name of the main drive

I'm using df /player/binary/location now to determine the storage device.

WARNING: potentially it could change display ID (hash will be changed) for some users - e.g. they had /dev/sda on the machine but were using /dev/sdb to store player binary. Because it should determine the location correctly now it will change the display's hash.

dasgarner commented 3 years ago

WARNING: potentially it could change display ID (hash will be changed) for some users - e.g. they had /dev/sda on the machine but were using /dev/sdb to store player binary. Because it should determine the location correctly now it will change the display's hash.

If the display hash has already been calculated and stored in settings, then nothing should change that value unless settings is deleted. For example, the user might set a completely custom displayID instead of using the pre-generated one.

Please can you confirm that this PR will not change this behaviour, and will only generate a new hash for fresh installations, or for uninstall/reinstall where settings are removed?

Stivius commented 3 years ago

Yes, exactly. I should have mentioned that before. This behaviour is applied to new installation/settings update.

dasgarner commented 3 years ago

Yes, exactly. I should have mentioned that before. This behaviour is applied to new installation/settings update.

Thank you - that makes sense to me then. I'll merge.