Modify for sysctl config persistent.
This commit is contained in:
parent
8d8848da16
commit
ff5447d2fb
|
@ -34,6 +34,7 @@ set_sysctl_param() {
|
||||||
local VALUE=$2
|
local VALUE=$2
|
||||||
debug "Setting $SYSCTL_PARAM to $VALUE"
|
debug "Setting $SYSCTL_PARAM to $VALUE"
|
||||||
if [ "$(sysctl -w $SYSCTL_PARAM=$VALUE 2>/dev/null)" = "$SYSCTL_PARAM = $VALUE" ]; then
|
if [ "$(sysctl -w $SYSCTL_PARAM=$VALUE 2>/dev/null)" = "$SYSCTL_PARAM = $VALUE" ]; then
|
||||||
|
echo "$SYSCTL_PARAM = $VALUE" >> /etc/sysctl.conf
|
||||||
FNRET=0
|
FNRET=0
|
||||||
elif [ $? = 255 ]; then
|
elif [ $? = 255 ]; then
|
||||||
debug "$SYSCTL_PARAM does not exist"
|
debug "$SYSCTL_PARAM does not exist"
|
||||||
|
|
Loading…
Reference in New Issue