Skip to content

Commit

Permalink
Merge pull request void-linux#40 from voidlinux/busybox-sysctl
Browse files Browse the repository at this point in the history
core-services: sysctl --system fallback for busybox
  • Loading branch information
uggedal committed Aug 27, 2015
2 parents 95e7eb7 + 9fa18b2 commit ef157a5
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions core-services/08-sysctl.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
# vim: set ts=4 sw=4 et:

if [ -x /sbin/sysctl -o -x /bin/sysctl ]; then
msg "Loading sysctl(8) settings..."
sysctl --system
msg "Loading sysctl(8) settings...\n"

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
fi

0 comments on commit ef157a5

Please sign in to comment.