gluon-core: add support for removing sysctl settings
This commit is contained in:
parent
3fc9154d1d
commit
d2373590e0
@ -4,5 +4,9 @@ local util = require 'gluon.util'
|
||||
module 'gluon.sysctl'
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user