Merge "Update sysctl-write-value to do conflict checking"
This commit is contained in:
commit
b34c5db441
@ -26,7 +26,18 @@ fi
|
||||
|
||||
FILENAME="/etc/sysctl.d/${NAME}.conf"
|
||||
|
||||
if [ -f $FILENAME ]; then
|
||||
# check to make sure the settings match... otherwise fail
|
||||
if ! grep -q "^$NAME = $VALUE" $FILENAME; then
|
||||
echo "Conflicting sysctl.conf setting for $NAME == $VALUE. Found:"
|
||||
grep "^$NAME" $FILENAME
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
|
||||
cat > $FILENAME <<EOF_CAT
|
||||
# $COMMENT
|
||||
$NAME = $VALUE
|
||||
EOF_CAT
|
||||
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user