Page MenuHomeVyOS Platform

custom sysctl setting fail because of output redirection
Closed, ResolvedPublicBUG

Description

When I'm trying to set custom sysctl settings in the CLI, it fails because of an output redirection error.

[edit system sysctl]
vyos@firewall# set custom net.core.rmem_max value 16777216
[edit system sysctl]
vyos@firewall# commit
[ system sysctl custom net.core.rmem_max value 16777216 ]
sysctl: write error: Bad file descriptor
exec of /sbin/sysctl failed: '/sbin/sysctl -w net.core.rmem_max=16777216 2>&1 1>&-' at /opt/vyatta/sbin/vyatta_update_sysctl.pl line 68.

[[system sysctl custom net.core.rmem_max value]] failed
Commit failed
[edit system sysctl]

File: /opt/vyatta/sbin/vyatta_update_sysctl.pl.

65c65
<         my $cmd = "$SYSCTL -w $sysctl_opt=$nvalue 2>&1 1>&-";
---
>         my $cmd = "$SYSCTL -w $sysctl_opt=$nvalue &>/dev/null";
`

The above patch fixes the issue, since the output of the command does not seem to be important.

Details

Difficulty level
Unknown (require assessment)
Version
1.2.0-rolling+201805020337
Why the issue appeared?
Will be filled on close