#!/bin/bash # ~/.kde?Autostart/chksrvr rm20090205 # Manually edit this variable to correct server ip IP1=192.168.1.5 # Use ping -c1 to send one packet only # Use > /dev/null 2>&1 to redirect standard out and # error to /dev/null because we don't need to see it ping -c1 $IP1 > /dev/null 2>&1 # Ping will return a zero if there was a packet returned # from the server and the three NFS shares will be mounted if [ $? -eq 1 ];then kdialog --error "The server is not turned on!\n\nYou will not be able to print anything \ or access the directories /videos, /videos/archive and /var/backup.\n\nTo print and access \ the remote directories turn on the server run the command \" mtnfs \" as root to mount\ the directories after booting up the server.\n\nIf the server is up and you get this message\ it means you do not have a network connection to the server." --title "The server is down!" fi #end of script