34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
diff -up sapconf-0.98/sapconf.shmall-shmmax sapconf-0.98/sapconf
|
|
--- sapconf-0.98/sapconf.shmall-shmmax 2016-11-11 17:18:30.613505902 +0100
|
|
+++ sapconf-0.98/sapconf 2016-11-11 17:19:28.216292840 +0100
|
|
@@ -10,6 +10,7 @@
|
|
# Jaroslav Škarvada <jskarvad@redhat.com>
|
|
# Nils Philippsen <nils@redhat.com>
|
|
# Jan Grulich <jgrulich@redhat.com>
|
|
+# Than Ngo <than@redhat.com>
|
|
|
|
############################################################################
|
|
#
|
|
@@ -310,10 +311,10 @@ for i in $VARS; do
|
|
#[ $VERBOSE -eq 1 ] && echo "OLD: $i: ${!i} ($req=${!req}) ($min=${!min})"
|
|
[ ${!req} -lt ${!min} ] && eval $req=${!min} # new = max(calculated, minimum)
|
|
# 'unlimited' is realized as -1, take care of this
|
|
- if [ $((${!i})) -lt 0 ]; then
|
|
+ if (( $(bc <<< "${!i} < 0") )); then
|
|
eval $req=$((${!i}))
|
|
else
|
|
- [ ${!i} -gt ${!req} ] && eval $req=${!i} # new = max(current, recommended)
|
|
+ (( $(bc <<< "${!i} > ${!req}") )) && eval $req=${!i} # new = max(current, recommended)
|
|
fi
|
|
#[ $VERBOSE -eq 1 ] && echo "NEW: $i: ${!i} ($req=${!req}) ($min=${!min})"
|
|
done
|
|
@@ -323,7 +324,7 @@ out "Checking Kernel Parameters ... In P
|
|
ec=0
|
|
for v in $VARS; do
|
|
eval "s=\$${v} ; r=\$${v}_REQ"
|
|
- if [ $s -ge $r ]; then
|
|
+ if (( $(bc <<< "$s == $r") )) ; then
|
|
out "$v : $s ... OK"
|
|
else
|
|
out "$v : set: $s, required: $r ... NEEDS TO BE CHANGED"
|