On Thu, 4 Sep 2003 11:30:31 -0300 (BRT)
Tiago Ferraz Machado - estagiario <[EMAIL PROTECTED]> wrote:

> We have a problem here... We want to show a message to the user (kind of             
>                               
> motd) that is sitted at the machine (do not turn off or any other advice)            
>                               
> but we don't want to show the same message to the user that logged at the            
>                               
> machine through network.                                                             
>                               

If all your local IP's resolve to a local domain name 
this'll work if you substitute your domain name:

if $(who -m | grep -q 'YourLocalDomain.com')
then  echo "Local User Message"
else  echo "Remote User Message"
fi

This isn't perfect but depending on the use, may be
good enough.   

Cheers,
Sean


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to