sap*preconfigure: sysctl checks fail when config file has comments#996
Conversation
…constructing sysctl parameters
|
@rob0d Thanks for this. I had a quick look at The following example should contain any allowed patterns I can think of (note that the second empty line contains three spaces and that the third empty line contained a It seems that the following awk statement will display only valid parameters:
Note: NF is 0 for a line without a white space and 1 for a line with one or more white space characters. |
…sctl parameter construction - improved version from Bernd
|
@berndfinger oh yes. We rushed a fix out as we needed to continue, but this is definitely better. Updated. Thanks Bernd. |
Hi @berndfinger,
PR#807 introduced checks of kernel parameters to support indepotency.
However, under very rare circumstances when the sysctl conf files contain comments (#) this check fails as the awk command includes the line with the comments as a kernel parameter to check.
It generates something like:
sysctl #This is comment net.ipv4.tcp_rmemThis PR makes a minor change to make awk exclude all lines starting with # (i.e. ^#).
Kudos @James-Allen_nbs.