gluon-core: add support for removing sysctl settings

This commit is contained in:
Matthias Schiffer 2016-11-30 19:38:05 +01:00
parent 3fc9154d1d
commit d2373590e0
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -4,5 +4,9 @@ local util = require 'gluon.util'
module 'gluon.sysctl' module 'gluon.sysctl'
function set(name, value) function set(name, value)
util.replace_prefix('/etc/sysctl.conf', name .. '=', name .. '=' .. value .. '\n') local new
if value then
new = name .. '=' .. value .. '\n'
end
util.replace_prefix('/etc/sysctl.conf', name .. '=', new)
end end