a Little Notes

Icon

TUlisan dan Contekan

Shutdown LTSP Client

  • Install Slay
  • Edit lts.conf > tambahin ALLOW_SHUTDOWN = Y
  • Restart kompie client
  • Buat script shutdown

Ok kita akan membuat scripts di direktori /scripts

# mkdir /scripts

#cd /scripts

#touch client.list (membuat daftar login client)

#vim client.list

ws001
ws002
ws003
ws004
ws005
ws006
ws007
ws008
ws009
ws010
ws011
ws012
:wq

#touch shutdown-client

#vim shutdown-client

#!/bin/sh
#
# Mateni Client LTSP
#

for i in `cat /scripts/client.list`;
do
echo “shuting down workstation “+ $i;
sudo ltspinfo –shutdown -h $i
done

for j in ‘cat /scripts/user.list’;
do
echo “slay all client”+ $j;
sudo slay $j
done

/usr/bin/logger -t ltsp-cleaner “Kabeh Client Wis Mati :-)

exit 0
:wq

#chmod u+x shutdown-client

untuk shutdown kita bisa memanggilnya dari konsole (user root atau gunakan visudo untuk user selain root)

#/scripts/shutdown-client

Done !

Bisa digunakan shortcut di desktop operator biar bisa matiin client sekaligus tentunya user name yang digunakan untuk operator punya hak akses untuk itu. Saya menggunakan username billing untuk operator dan saya tambahkan kedalam group teacher.

#visudo

%teachers ALL=NOPASSWD:/usr/sbin/fl_teachertool
%teachers ALL=NOPASSWD:/usr/bin/slay
%teachers ALL=NOPASSWD:/usr/bin/ltspinfo
%acrobat ALL=NOPASSWD:/usr/bin/acroread
%acrobat ALL=NOPASSWD:/bin/pwd
Inspiration From :

http://iwansetiawan.wordpress.com/2007/07/20/shutdown-ltsp-client/#comment-67

http://www.skolelinux.no/~klaus/sarge/x2700.html

Filed under: LTSP, scripts

Leave a Reply