0

Any ideas where the base scripts for landscape-sysinfo are? I would like to add some custom colors. For example, when RAM is between 0 and 50%, color the percentage green, 50-70% color yellow, etc. I Tried looking in /usr/bin/landscape-sysinfo and I'm not finding anything that I can add some bash to. Suggestions on locations?

Thanks

Atomiklan
  • 395
  • 1
  • 4
  • 20

1 Answers1

2

They are python based. /usr/bin/landscape-sysinfo opens up a python library:

from landscape.sysinfo.deployment import run

Which is located under:

/usr/lib/python2.7/dist-packages/landscape/sysinfo

But, you will probably have a difficult time "just adding color" here as the package will be updated from time to time wiping out your changes. But feel free to mess around with it. :)

Note this package is completely open source and housed in the landscape-client source code. It's installed with the 'landscape-common' package onto your system.

If you just want to modify the message you see printed out, there are a lot of ways to do that, and these are great starting points:

dpb
  • 6,989
  • 1
  • 34
  • 60