just noticed something odd ... on my fedora 27 system, the man page
for sysctl reads under PARAMETERS:

    variable=value
       To set a key, use the form variable=value where variable is the key
       and value is the value to set it to.  If the value contains quotes or
       characters which are parsed by the shell, you may need to enclose
       the value in double quotes.  This requires the -w parameter to use.

  hang on ... setting a variable "requires" the -w parameter? that's
explained further down:

    -w, --write
       Use this option when you want to change a sysctl setting.

  as i read that, "-w" is *required* to modify a sysctl variable at
run-time, but i tested it with my favourite example:

  # sysctl net.ipv4.ip_forward=0

and that modified that variable just fine with no need for "-w":

  # sysctl net.ipv4.ip_forward
  net.ipv4.ip_forward = 0
  #

so what exactly is "-w" for?

rday

_______________________________________________
Linux mailing list
Linux@lists.oclug.on.ca
http://oclug.on.ca/mailman/listinfo/linux

Reply via email to