-
-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hddtemp: remove deprecated telnetlib dependency (fixes #2261) #2262
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need NOT_INSTALLED
post_config_hook exception for netcat
or is that overkill?
At first I had trouble to get hddtemp answering at telnet interface. Maybe we should add note to enable hddtemp daemon? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We can add note. Please and thank you.
py3status/modules/hddtemp.py
Outdated
@@ -133,9 +135,11 @@ def post_config_hook(self): | |||
self.keys = ["path", "name", "temperature", "unit"] | |||
self.cache_names = {} | |||
self.thresholds_init = self.py3.get_color_names_list(self.format_hdd) | |||
if not self.py3.check_commands("netcat"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this to first line under post_config_hook
?
I'm looking up differences between netcat
, ncat
/nc
... I think ncat
/nc
is better... More active development... Honestly, we can add support for both netcat
+ ncat
/nc
, but meh... Overkill.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me, nc is symblink to netcat. (manjaro/archlinux).
In debian systems they are linked to alternatives.
valdur@x /bin> ls -lah ncat nc netcat lrwxrwxrwx 1 root root 20 juuli 12 2020 nc -> /etc/alternatives/nc* -rwxr-xr-x 1 root root 221K jaan 30 2023 ncat* lrwxrwxrwx 1 root root 24 juuli 12 2020 netcat -> /etc/alternatives/netcat*
valdur@x :/etc/alternatives $ ls -lah nc netcat lrwxrwxrwx 1 root root 20 juuli 12 2020 nc -> /bin/nc.openbsd lrwxrwxrwx 1 root root 20 juuli 12 2020 netcat -> /bin/nc.openbsd
I didn't even know that ncat exists.
For me it looks like netcat/nc is more commonly installed that ncat.
Changed nc to netcat because if you google just nc you wont get far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. I'm using Fedora i3 Spin VM to sometimes deal with py3status on macOS.
Netcat (classic) is not installed, but nc / ncat (nmap) is...
lasers@fedora:~$ rpm -qf $(which nc)
nmap-ncat-7.92-2.fc40.aarch64
lasers@fedora:~$ rpm -qf $(which ncat)
nmap-ncat-7.92-2.fc40.aarch64
lasers@fedora:~$ rpm -qf $(which netcat)
/usr/bin/which: no netcat in (/home/lasers/.local/bin:/home/lasers/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
rpm: no arguments given for query
I think you had it right the first time.... Most linux distributions probably set up symlinks pointing to nc
for most thing... so we could just point it to nc
too... and just skip STRING_NOT_FOUND
entirely.
I can't test hddtemp too because of VM (Got vda instead of sda).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, my bad. I still would like to check for nc
. Let's just check and use nc
and be done with that.
…nd informs about missing hddtemp, ncat/netcat.
Thanks a lot! |
No description provided.