Package: procps
Version: 2:4.0.7-1
"sysctl -a" always exits with a non-zero status code on my system. It
successfully dumps the value of over 2k settings. This is causing
scripts that run this command to fail, despite it appearing to succeed:
# sysctl -a >/dev/null; echo $?
1
# sysctl -a | wc -l
2076
I believe this upstream merge request fixes the issue:
https://gitlab.com/procps-ng/procps/-/merge_requests/308
Based on the comment above the changed lines, errors reading IPv6
stable_secret settings should be ignored, but in the unfixed version,
the line that sets the exit status incorrectly uses EXIT_FAILURE. The
merge request changes this to EXIT_SUCCESS.
Running the following script corroborates this as the likely issue on my
system:
for f in /proc/sys/net/ipv6/conf/*/stable_secret; do
if ! cat "$f" >/dev/null 2>&1; then
echo "Cannot read: $f"
fi
done
This outputs:
Cannot read: /proc/sys/net/ipv6/conf/all/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/default/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/docker0/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/enp0s31f6/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/lo/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/virbr0/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/virbr1/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/wgzabbix/stable_secret
Cannot read: /proc/sys/net/ipv6/conf/wt0/stable_secret
--
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers
If you correspond with me on a regular basis, please read this document:
http://www.chrishowie.com/email-preferences/
PGP fingerprint: 2B7A B280 8B12 21CC 260A DF65 6FCE 505A CF83 38F5
------------------------------------------------------------------------
IMPORTANT INFORMATION/DISCLAIMER
This document should be read only by those persons to whom it is
addressed. If you have received this message it was obviously addressed
to you and therefore you can read it.
Additionally, by sending an email to ANY of my addresses or to ANY
mailing lists to which I am subscribed, whether intentionally or
accidentally, you are agreeing that I am "the intended recipient," and
that I may do whatever I wish with the contents of any message received
from you, unless a pre-existing agreement prohibits me from so doing.
This overrides any disclaimer or statement of confidentiality that may
be included on your message.