Thx Crystal and Jan..


Here the new script:

/usr/local/sbin/sigh.sh:

#!/bin/sh

p='wiz@'
g=`*cat /etc/mygate*`

if ping -c 1 -w 5 $g 2>&1
then
echo "ww-$p" > /tmp/.sigh.log
else
echo "$p" > /tmp/.sigh.log
fi


add to /home/youruser/.profile:

export PS1='`cat /tmp/.sigh.log`$PWD\$ '


add to crontab -e by root :

1 * * * * /usr/local/sbin/sigh.sh


and please check for the correct permissions of /tmp in this case.


Appreciated, a lot. Thx!


dan
bsd.numode.eu

Reply via email to