imrahil / OctoPrint-NavbarTemp

Plugin for OctoPrint - displays temperatures on navbar
GNU Affero General Public License v3.0
44 stars 50 forks source link

bullseye path for vcgencmd #90

Closed robness closed 2 years ago

robness commented 2 years ago

Testing the upcoming bullseye version I noticed the plugin was no longer working for the SOC temperature. vcgencmd is now in a different location.

arekm commented 2 years ago

Is /usr/bin/vcgencmd missing on old versions?

Looking at buster:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
Release:    10
Codename:   buster
$ ls -l /opt/vc/bin/vcgencmd /usr/bin/vcgencmd
-rwxr-xr-x 1 root root 16452 Mar  8 13:54 /opt/vc/bin/vcgencmd
lrwxrwxrwx 1 root root    20 Mar  8 15:42 /usr/bin/vcgencmd -> /opt/vc/bin/vcgencmd
robness commented 2 years ago

Is /usr/bin/vcgencmd missing on old versions?

Looking at buster:

$ lsb_release -a
No LSB modules are available.
Distributor ID:   Raspbian
Description:  Raspbian GNU/Linux 10 (buster)
Release:  10
Codename: buster
$ ls -l /opt/vc/bin/vcgencmd /usr/bin/vcgencmd
-rwxr-xr-x 1 root root 16452 Mar  8 13:54 /opt/vc/bin/vcgencmd
lrwxrwxrwx 1 root root    20 Mar  8 15:42 /usr/bin/vcgencmd -> /opt/vc/bin/vcgencmd

I didn't check for the symlink. Maybe the code just needs to point to /usr/bin/vcgencmd then to account for both versions?

arekm commented 2 years ago

That's the idea.

Jessie also has it.

2017-06-21-octopi-jessie-lite-0.14.0.img

$ ls -l 1/usr/bin/vcgencmd 1/opt/vc/bin/vcgencmd
-rwxr-xr-x 1 root root 15176 Sep 22  2016 1/opt/vc/bin/vcgencmd
lrwxrwxrwx 1 root root    20 May 15  2017 1/usr/bin/vcgencmd -> /opt/vc/bin/vcgencmd

Now looking for older image downloads.

arekm commented 2 years ago

2013-07-26-wheezy-octopi-0.5.img

$ ls -l 1/usr/bin/vcgencmd 1/opt/vc/bin/vcgencmd
-rwxr-xr-x 1 root root 15054 Jun 19  2013 1/opt/vc/bin/vcgencmd
lrwxrwxrwx 1 root root    20 Jun 19  2013 1/usr/bin/vcgencmd -> /opt/vc/bin/vcgencmd

so we can safely assume that /usr/bin/vcgencmd was always available.

robness commented 2 years ago

2013-07-26-wheezy-octopi-0.5.img

$ ls -l 1/usr/bin/vcgencmd 1/opt/vc/bin/vcgencmd
-rwxr-xr-x 1 root root 15054 Jun 19  2013 1/opt/vc/bin/vcgencmd
lrwxrwxrwx 1 root root    20 Jun 19  2013 1/usr/bin/vcgencmd -> /opt/vc/bin/vcgencmd

so we can safely assume that /usr/bin/vcgencmd was always available.

2013-07-26-wheezy-octopi-0.5.img

$ ls -l 1/usr/bin/vcgencmd 1/opt/vc/bin/vcgencmd
-rwxr-xr-x 1 root root 15054 Jun 19  2013 1/opt/vc/bin/vcgencmd
lrwxrwxrwx 1 root root    20 Jun 19  2013 1/usr/bin/vcgencmd -> /opt/vc/bin/vcgencmd

so we can safely assume that /usr/bin/vcgencmd was always available.

I mad e a new commit so now it's just pointing at /usr/bin/vcgencmd without the additional logic

arekm commented 2 years ago

Please change it to apply agains devel branch (should be possible to change in github pull page). Note: can be more problematic than just changing on github. Most likely you will need to recreate your branch based on devel but first check if changing on github is enough.

arekm commented 2 years ago

For reference path on bullseye:

$ ls -l  /usr/bin/vcgencmd
-rwxr-xr-x 1 root root 18776 Apr 11 18:32 /usr/bin/vcgencmd