[arch-projects] [PATCH] initscripts: load of sysctl files at startup

Earendil earendil_fr at inpactien.com
Sun Aug 28 17:44:17 EDT 2011


Hi 

Just a little patch to correct the load of the sysctl configuration file
at startup.

I have also added the capability to stip th sysctl.conf files in many
files in the sysctl.d directory.
This idea was inspired by Debian architecture.

Feel free

-- 
keys.gnupg.net: 0xEBCBE59D

"J'ai toujours rêvé d'un ordinateur qui soit aussi facile à utiliser 
 qu'un téléphone. Mon rêve s'est réalisé : je ne sais plus comment 
 utiliser mon téléphone."

 Bjarne Stroustrup

------------ PATCH -----------------------
--- rc.multi.orig   2011-07-28 14:21:07.000000000 +0200
+++ rc.multi    2011-08-12 23:48:23.914340475 +0200
@@ -9,7 +9,10 @@
 run_hook multi_start

  # Load sysctl variables if sysctl.conf is present
  -[[ -r /etc/sysctl.conf ]] && sysctl -q -p &>/dev/null
  +for file in /etc/sysctl.conf /etc/sysctl.d/*.conf ; do
  +    [[ -r "${file}" ]] && sysctl -q -p "${file}" &> /dev/null
  +done
  +stat_done

   # Start daemons
    for daemon in "${DAEMONS[@]}"; do

------------------------------------------
-------------- next part --------------
--- rc.multi.orig	2011-07-28 14:21:07.000000000 +0200
+++ rc.multi	2011-08-12 23:48:23.914340475 +0200
@@ -9,7 +9,10 @@
 run_hook multi_start
 
 # Load sysctl variables if sysctl.conf is present
-[[ -r /etc/sysctl.conf ]] && sysctl -q -p &>/dev/null
+for file in /etc/sysctl.conf /etc/sysctl.d/*.conf ; do
+    [[ -r "${file}" ]] && sysctl -q -p "${file}" &> /dev/null
+done
+stat_done
 
 # Start daemons
 for daemon in "${DAEMONS[@]}"; do
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20110828/cec983c2/attachment.asc>


More information about the arch-projects mailing list