sysctl does not accept key value pairs with spaces, but perhaps should

Bug #1076331 reported by Jason Spashett
This bug affects 1 person
Affects Status Importance Assigned to Milestone
procps (Ubuntu)

Bug Description

For example, the config files in /etc/sysctl.conf have spaces between name and value pairs

The problem is that the values probably get played into sysctl -w somehow

sysctl does not seem to accept name value pairs with spaces, yet it displayes them with spaces via sysctl -a


sysctl -w vm.swappiness = 100 (won't work)
sysctl -w vm.swappiness=100 (works)

The existing files in /etc/sysctl.conf all seem to have spaces in thier settings, as if sysctl -a output was used to generate them.

probably sysctl should be modified to be more consistent / less confusing / error prone.

Revision history for this message
Jason Spashett (jspashett) wrote :

The only realistic solutions appear to be:

(1) Make sysctl -a output name value paris without spaces for consistency
(2) Make the things that generate files in /etc/sysconf.d not put spaces in.

The way the sysctl command line works requires one or more name value pairs with no space seperation.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions