Skip to content
Snippets Groups Projects
Commit 0fd7ac17 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

gluon-core: add and use a sysctl Lua module

parent 1c0429ce
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
#!/usr/bin/lua
. /lib/gluon/functions/sysctl.sh
local sysctl = require 'gluon.sysctl'
sysctl_set vm.panic_on_oom 1
sysctl.set('vm.panic_on_oom', 1)
local util = require 'gluon.util'
module 'gluon.sysctl'
function set(name, value)
util.replace_prefix('/etc/sysctl.conf', name .. '=', name .. '=' .. value .. '\n')
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment