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:
Linux smbserver 2.6.32-45-generic-pae #102-Ubuntu SMP Wed Jan 2 22:10:16 UTC 2013 i686 GNU/Linux Ubuntu 10.04.2 LTS Welcome to Smbserver, TurnKey Linux 11.1 / Ubuntu 10.04 Lucid LTS System information (as of Wed Apr 03 05:21:18 2013) System load: 0.00 Memory usage: 32% Processes: 111 Swap usage: 2% Usage of /: 45.1% of 16.73GB IP address for eth0: 192.168.x.x Usage of /data/: 95.0% of 125.89GB TKLBAM (Backup and Migration): NO BACKUPS To backup for the first time run the "tklbam-backup" command. For details see the man page or go to: http://www.turnkeylinux.org/tklbam Last login: Tue Apr 2 17:25:12 2013 from xxxxxxI 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