aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-05-16 13:00:00 +0300
committerCem Keylan <cem@ckyln.com>2020-05-16 13:00:00 +0300
commit12bf18ba843cfbc2f332121a366b565088e31fbf (patch)
treeb80f4abeb8efe29fc5eed984940dd4487cd742f9
parenta26f2f9a233cb19e4f0706aef696107fa467d016 (diff)
downloadinit-12bf18ba843cfbc2f332121a366b565088e31fbf.tar.gz
rc.boot: drop the usage of find
-rwxr-xr-xrc.boot24
1 files changed, 9 insertions, 15 deletions
diff --git a/rc.boot b/rc.boot
index 8c9838d..cc31d00 100755
--- a/rc.boot
+++ b/rc.boot
@@ -96,21 +96,15 @@ out "Setting hostname..."; {
}
out "Loading sysctl settings..."; {
- find /run/sysctl.d \
- /etc/sysctl.d \
- /usr/local/lib/sysctl.d \
- /usr/lib/sysctl.d \
- /lib/sysctl.d \
- /etc/sysctl.conf \
- -name \*.conf -type f 2>/dev/null \
- | while read -r conf; do
- seen="$seen ${conf##*/}"
-
- case $seen in
- *" ${conf##*/} "*) ;;
- *) printf '%s\n' "* Applying $conf ..."
- sysctl -p "$conf" ;;
- esac
+ for conf in \
+ /run/sysctl.d/*.conf \
+ /usr/lib/sysctl.d/*.conf \
+ /etc/sysctl.d/*.conf \
+ /etc/sysctl.conf; do
+
+ [ -f "$conf" ] || continue
+ out "Appling $conf ..."
+ sysctl -p "$conf"
done
}