sysctl: use @SYSCONFDIR@ in the scripts instead of hard coding /etc
This commit is contained in:
parent
09327f429f
commit
6ac182c9ca
@ -13,7 +13,7 @@ start()
|
|||||||
local retval=0 var= comments= conf=
|
local retval=0 var= comments= conf=
|
||||||
ebegin "Configuring kernel parameters"
|
ebegin "Configuring kernel parameters"
|
||||||
eindent
|
eindent
|
||||||
for conf in /etc/sysctl.conf /etc/sysctl.d/*.conf; do
|
for conf in @SYSCONFDIR@/sysctl.conf @SYSCONFDIR@/sysctl.d/*.conf; do
|
||||||
if [ -r "$conf" ]; then
|
if [ -r "$conf" ]; then
|
||||||
vebegin "applying $conf"
|
vebegin "applying $conf"
|
||||||
while read var comments; do
|
while read var comments; do
|
||||||
|
@ -15,7 +15,7 @@ start()
|
|||||||
ebegin "Configuring kernel parameters"
|
ebegin "Configuring kernel parameters"
|
||||||
eindent
|
eindent
|
||||||
|
|
||||||
for conf in /etc/sysctl.conf /etc/sysctl.d/*.conf; do
|
for conf in @SYSCONFDIR@/sysctl.conf @SYSCONFDIR@/sysctl.d/*.conf; do
|
||||||
if [ -r "$conf" ]; then
|
if [ -r "$conf" ]; then
|
||||||
vebegin "applying $conf"
|
vebegin "applying $conf"
|
||||||
if ! err=$(sysctl -p "$conf" 2>&1 >/dev/null) ; then
|
if ! err=$(sysctl -p "$conf" 2>&1 >/dev/null) ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user