This simple configuration file for hoststated below is syntactically
correct (and semantically, too), however apparently only if its file
mode bits are 600 (which makes sense).

Somehow, I ended up with mode bits being set to 644, upon which
hoststated refused to accept it but throws an "Undefined error: 0".
It took me a while to figure out that it occurs due to mode bits being
set somewhat too liberal because the error does not provide any hint.
Also, I only upgraded to -current last night, and the same
configuration file was accepted with mode bits 644 by the latest
available snapshot without complaint before upgrading.

Actually, I just tried 'hoststated -d -f /etc/hoststated.rs' which
throuws the same error, but only after hinting about the mode bits
being wrong. So it might be helpful to just add the same hint output
to the -n option as well.

I had no opportunity to crosscheck on sparc64 -current yet, or to
propose a small diff, sorry for that.

Thanks,
Rolf


[EMAIL PROTECTED]:root]# cat /etc/hoststated.rs
extAddr="1.2.3.4"

table rsHosts {
 real port http
 check icmp
 host 10.2.90.3
}

service rsService {
 virtual host $extAddr port 80 interface carp11
 table rsHosts
}
[EMAIL PROTECTED]:root]# ls -al /etc/hoststated.rs
-rw-------  1 root  wheel  170 Oct 18 20:42 /etc/hoststated.rs
[EMAIL PROTECTED]:root]# hoststated -n -f /etc/hoststated.rs
configuration OK
[EMAIL PROTECTED]:root]# chmod 644 /etc/hoststated.rs
[EMAIL PROTECTED]:root]# hoststated -n -f /etc/hoststated.rs
hoststated: /etc/hoststated.rs: Undefined error: 0
[EMAIL PROTECTED]:root]# hoststated -d -f /etc/hoststated.rs
/etc/hoststated.rs: group/world readable/writeable
hoststated: /etc/hoststated.rs: Undefined error: 0
[EMAIL PROTECTED]:root]# dmesg
OpenBSD 4.2-current (GENERIC.MP) #5: Thu Oct 18 06:00:11 CEST 2007
    [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC.MP
cpu0: Dual-Core AMD Opteron(tm) Processor 2210 ("AuthenticAMD"
686-class, 1024KB L2 cache) 1.80 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,CX16
real mem  = 2146979840 (2047MB)
avail mem = 2068201472 (1972MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 04/11/07, BIOS32 rev. 0 @
0xf0010, SMBIOS rev. 2.3 @ 0xfbd50 (70 entries)
bios0: vendor American Megatrends Inc. version "0ABJX039" date 04/11/2007
bios0: Sun Microsystems Sun Fire X4100 M2
...

Reply via email to