You are here
Alex Whatley - Sun, 2012/10/07 - 21:48
Hey,
I have recently installed Turnkey Domain controller to run in my network. I would like to set up the MOTD on ssh login to show more then just the free space on "/". I cannot figure out how to change it. I have tried adding a line to the file /usr/bin/turnkey-sysinfo but it will only replace the disk usage and not add another one to it.
Any help would be great.
Alex
Forum:
Tags:
I'm not familiar with customising the MOTD
But Debian has a wiki page on it (TKL v12.x is based on Debian 6/Squeeze).
Its not the MOTD itself
Hey,
Its the turnkey-sysinfo that i am having issues, the MOTD pulls info from that file, and I cannot seem to figure it out.
HowTo edit turnkey-sysinfo for MOTD
Ok so I added a separate data volume to separate file shares from system volume, and I also wanted to know disk space of the volume supporting the file shares on login.
Here's what my current MOTD looks like:
I edited the file with vi /usr/lib/turnkey-sysinfo/turnkey-sysinfo.py
Use pico if vi confuses you.
Under def_main(): I added a new disk.usage variable (disk_usage1) right after the first one referencing where I mounted the second disk,
disk_usage = "Usage of /: " + disk.usage("/")
disk_usage1 = "Usage of /data/: " + disk.usage("/srv/storage/data")
then added a "row" with rows.append((disk_usage1,'')) in front of the print statements which pull everything together.
for nic in nics[1:]:
rows.append(('', nic))
rows.append((disk_usage1,''))
Hope this helps.
Best regards,
Jeff
--
Add new comment