openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
818 stars 251 forks source link

Fix service script on Openhabian (and every other *nix) #1813

Closed uqs closed 9 months ago

uqs commented 9 months ago

rm(1) resides in /bin, not /usr/bin

mstormi commented 9 months ago

That's not right. On Debian it is /usr/bin (too, at least), and openHABian is Debian only so it wasn't broken. This was even sort of intentional as you should not be running on non-Debian. Then again changing to /bin shouldn't do harm, so I did (but outside of this PR as the commit msgs would be wrong).

uqs commented 9 months ago

To add some more history on how this was broken:

So it stands to reason that Stretch had no /usr/bin/rm (I do wonder why that even was added later, rm(1) has been in /bin since time immemorial, and that's also true on every *nix that I've encountered over the last 20+ years).

What's most worrying is however how crappy the Debian upgrade process seems to be, if it can't do https://wiki.debian.org/UsrMerge properly

If you're curious, compare: https://github.com/search?q=%22%2Fbin%2Frm&type=code

vs

https://github.com/search?q=%22%2Fusr%2Fbin%2Frm&type=code

also.

If you had suggestions on the commit message, you could've just written those here, I could've expanded more on why it's more robust and compatible this way. :)