Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
ffbs-gluon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ffbs
ffbs-gluon
Commits
0fd7ac17
Commit
0fd7ac17
authored
10 years ago
by
Matthias Schiffer
Browse files
Options
Downloads
Patches
Plain Diff
gluon-core: add and use a sysctl Lua module
parent
1c0429ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
package/gluon-core/files/lib/gluon/upgrade/core/invariant/013-reboot-on-oom
+3
-3
3 additions, 3 deletions
.../files/lib/gluon/upgrade/core/invariant/013-reboot-on-oom
package/gluon-core/files/usr/lib/lua/gluon/sysctl.lua
+8
-0
8 additions, 0 deletions
package/gluon-core/files/usr/lib/lua/gluon/sysctl.lua
with
11 additions
and
3 deletions
package/gluon-core/files/lib/gluon/upgrade/core/invariant/013-reboot-on-oom
+
3
−
3
View file @
0fd7ac17
#!/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
)
This diff is collapsed.
Click to expand it.
package/gluon-core/files/usr/lib/lua/gluon/sysctl.lua
0 → 100644
+
8
−
0
View file @
0fd7ac17
local
util
=
require
'gluon.util'
module
'gluon.sysctl'
function
set
(
name
,
value
)
util
.
replace_prefix
(
'/etc/sysctl.conf'
,
name
..
'='
,
name
..
'='
..
value
..
'
\n
'
)
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment