john30 / ebusd

daemon for communication with eBUS heating systems
GNU General Public License v3.0
572 stars 132 forks source link

readall.sh nc: invalid option -- 'q' #429

Open Der-Schubi opened 3 years ago

Der-Schubi commented 3 years ago

Hello,

i'm using Arch Linux and the readall.sh Script isn't working, as netcat has no switch 'q'. This switch is only used on OpenBSD netcat (Debian, Ubuntu, ...), but Arch uses GNU netcat.

Both versions have a switch "w" for the timeout, even though the long version is different. As for the EOF part of 'q', GNU netcat knows a 'c' switch. I'm not sure if 'w' would be enough here?

GNU netcat 0.7.1: -w, --wait=SECS timeout for connects and final net reads -c, --close close connection on EOF from stdin

OpenBSD netcat (Debian patchlevel 1.206-1ubuntu1): -w timeout Timeout for connects and final net reads -q secs quit after EOF on stdin and delay of secs

For reference: #67 #68

Best Regards, Christian

GuillaumeC commented 3 years ago

Hello,

To force read all values I use this command: ebusctl f -l "*" -a|awk '{print $2}' | xargs -L1 -t ebusctl r

Regards

kratz00 commented 3 years ago

@Der-Schubi Arch Linux gives you a choice to install your preferred netcat flavor (The default is gnu-netcat though).

[kratz00@helios scripts]$ sudo pacman -S netcat
:: There are 2 providers available for netcat:
:: Repository extra
   1) gnu-netcat
:: Repository community
   2) openbsd-netcat

Enter a number (default=1): 2