puppet-sysctl icon indicating copy to clipboard operation
puppet-sysctl copied to clipboard

multivalues: change tabs to spaces

Open broerman opened this issue 5 years ago • 2 comments

example: net.ipv4.ip_local_port_range = 1024 64999

broerman avatar Sep 03 '20 12:09 broerman

Would be nice to have this merged! I have some settings that run in a constant exec-loop due to the /usr/bin/test outputs tabs instead of spaces, e.g.

Puppet run debug output:

Debug: Executing: '/usr/bin/test "$(/sbin/sysctl -n net.ipv4.tcp_wmem)" = "4096 12582912 16777216"'

Output when command run manually:

/sbin/sysctl -n net.ipv4.tcp_wmem
4096	12582912	16777216

Command run with suggested fix

/sbin/sysctl -n net.ipv4.tcp_wmem | /usr/bin/tr '\t' ' '
4096 12582912 16777216

gtufte avatar Oct 11 '21 09:10 gtufte

Please merge this. I can confirm that the changes in the pull request solved the space/tab issue for me.

bschonec avatar Jun 23 '22 14:06 bschonec