Xymon Mailing List Archive search

Xymon script question - bugfix for reboot script

list Jaap Winius
Thu, 06 Jul 2017 11:46:06 +0200
Message-Id: <user-785db4bdb2d3@xymon.invalid>

Quoting Jaap Winius <user-16708c3648e1@xymon.invalid>:

There are no doubt many more ways to improve the script I uploaded,  but if you take this line:

   RUN=$(uname -r |awk -F - '{print $1}') # Version of the running kernel

and replace it with

   RUN=$(uname -r |awk -F - '{print $1"-"$2}') # Version of the running kernel

then it will not malfunction in cases where multiple versions of a  kernel are present with the same major and minor revisions, but  different patch numbers.

Cheers,

Jaap