forked from void-linux/void-runit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core-services/sysctl: drop sysctl(8) --system requirement.
Use sysctl -p everywhere: works with procps-ng and busybox (and probably others as well).
- Loading branch information
Juan RP
committed
Sep 5, 2015
1 parent
ef157a5
commit 5f719f1
Showing
2 changed files
with
12 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
# vim: set ts=4 sw=4 et: | ||
|
||
if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then | ||
msg "Loading sysctl(8) settings...\n" | ||
msg "Loading sysctl(8) settings..." | ||
for i in /run/sysctl.d/*.conf \ | ||
/etc/sysctl.d/*.conf \ | ||
/usr/local/lib/sysctl.d/*.conf \ | ||
/usr/lib/sysctl.d/*.conf \ | ||
/etc/sysctl.conf; do | ||
|
||
if sysctl -V >/dev/null 2>&1; then | ||
sysctl --system | ||
else | ||
# Fallback for busybox sysctl | ||
for i in /run/sysctl.d/*.conf \ | ||
/etc/sysctl.d/*.conf \ | ||
/usr/local/lib/sysctl.d/*.conf \ | ||
/usr/lib/sysctl.d/*.conf \ | ||
/etc/sysctl.conf; do | ||
|
||
if [ -e "$i" ]; then | ||
printf '* Applying %s ...\n' "$i" | ||
sysctl -p "$i" | ||
fi | ||
done | ||
fi | ||
if [ -e "$i" ]; then | ||
printf '* Applying %s ...\n' "$i" | ||
sysctl -p "$i" | ||
fi | ||
done | ||
fi |