Date: Wed, 30 May 2001 11:41:27 +0400 From: "Andrey Simonenko" <simon@comsys.ntu-kpi.kiev.ua> To: "Veaceslav Revutchi" <sl@zeus.dnt.md> Cc: <freebsd-questions@freebsd.org> Subject: Re: ping result val. question Message-ID: <018801c0e8db$ef8c3900$6d36120a@comsys.ntukpi.kiev.ua> References: <20010530113020.A74532@zeus.dnt.md>
next in thread | previous in thread | raw e-mail | index | archive | help
A return value of 127 means the execution of the shell failed. And I'm not sure that sh(1) can find ping(8) program. Check $PATH variable in the /etc/crontab file. ----- Original Message ----- From: Veaceslav Revutchi <sl@zeus.dnt.md> Newsgroups: lucky.freebsd.questions Sent: Wednesday, May 30, 2001 12:30 PM Subject: ping result val. question > Hi > > I am confused as to why I get different return values > to a ping if run o a command line vs crontab. > > Here is a small script: > > #!/bin/sh > ping -c 2 somehost.somedomain.com > /dev/null > echo $? >> /var/log/ping.log > > Now if I run it on command line I get a normal result code described > in the ping man page and sysexits.h. If I run it from crontab I get a > 127 res. val. no matter if the ping was succesful or not. > > Can someone explain this behaviour please. > thanks > slava To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?018801c0e8db$ef8c3900$6d36120a>