[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another Qmail/OpenBSD Question





Kit Halsted wrote:
> If csh -cf '/var/qmail/rc &'
> is valid for rc.local, why does everything else in the file look like
> 
> if [ -x /usr/local/sbin/somedaemon ]; then
>         echo -n ' somedaemon';       /usr/local/sbin/somedaemon
> fi
> 
> ?

	It's a question of how paranoid you want to be about a file's
existence: the -x <file> tests whether or not it's executable, if I
remember correctly.  My rc.local looks (in part) like:

if [ -x /var/qmail/rc ]; then
  echo -n ' qmail'; csh -cf '/var/qmail/rc &'> /dev/null;
fi

> (Or, better yet, is this documented somewhere? I did read man
> rc.local, but it didn't answer my super-basic syntax questions.)

	This is part of the shell scripting syntax.