I've been given a set of values for the sysctl.conf file and I'd like to incorporate those into the kickstart so there is less manual work after the image is laid down.
I can collect the memory on the box w/ this:
awk '/^MemTotal/{ print $2 }' /proc/meminfo
I'd then like to fulfill the request to adjust kernel.shmall on the fly. The request is as follows:
kernel.shmall = MemTotal size / getconf PAGE_SIZE.
I cant seem to get past the fatal division by zero problem.
Here is the actual syntax.
Code:
awk '/^MemTotal/{ print $2 / system(getconf PAGE_SIZE) }' /proc/meminfo
awk: (FILENAME=/proc/meminfo FNR=1) fatal: division by zero attempted