On 14/03/2008, at 8:15 PM, Erwin van Maanen wrote:

Hello everyone,

I found out i couldn't disable my dhcp daemon yesterday and i think i've
traced the problem to this in /etc/rc:

        if [ X"${dhcpd_flags}" != X"NO" -a -f /etc/dhcpd.conf ]; then

Now i have no clue what " -a -f " does (anyone care to point me to the right manual?), but just setting dhcpd_flags=NO in rc.conf didn't disable it. I had to rename the file dhcpd.conf file, so i guess the line does an OR comparison instead of an AND comparison, anyone care to enlighten me or did
i actually find a minor bug?

Kind regards,

Erwin van Maanen
ACMEWeb I.S.

man test

     -f file       True if file exists and is a regular file.

     expression1 -a expression2
                   True if both expression1 and expression2 are true.

So I would read the logic to be ...

If dhcp_flags not eq NO AND the named file exists then do whatever ...

Which means - I think - that you should not have seen the behaviour that you did.

What EXACTLY did you put in rc.conf, and what did you do after changing
it (i.e. to get it to notice your change?)

And nothing relevant in rc.conf.local?

HTH a bit

Reply via email to