[hobbit] Feature request: OS support for GNU/kFreeBSD

Axel Beckert beckert at phys.ethz.ch
Mon Jan 28 10:22:50 CET 2008


Hi,

what a start in the new week. *grmbl*

On Mon, Jan 28, 2008 at 08:43:52AM +0100, pkc_mls wrote:
>> I tried to get hobbit compiling and running on Debian
>> GNU/kFreeBSD[1]. Getting it to compile was quite easy, getting it run,
>> too, but getting it work isn't[2].
>>
>>   [1] http://www.debian.org/ports/kfreebsd-gnu/
>>   [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=458417
>>
>> Getting the client run needed some more files to exist. Now I've got
>> an ugly but running client sending data to my hobbit
>> server. Unfortunately the server drops it with the message
>>
>> 2008-01-25 22:41:09 No client backend for OS 'gnu/kfreebsd' sent by [...]
>
> this is because there is no script hobbitclient-gnu/kfreebsd.sh in
> the ~hobbit/client/bin directory.

No this is wrong. I already tested it and have a script at appropriate
location in the ~hobbit/client/bin directory and it still happens,
because the real reason is -- as I already wrote (see below) -- this
snippet of C code inside hobbitd/hobbitd_client.c:

   1757 os = get_ostype(clientos);
   [...]
   1763 switch (os) {
   1764   case OS_FREEBSD: 
   1765         handle_freebsd_client(hostname, clientclass, os, hinfo, sender, timestamp, restofmsg);
   1766         break;
   1767 
   [...]
   1812   case OS_UNKNOWN:
   1813         errprintf("No client backend for OS '%s' sent by %s\n", clientos, sender);
   1814         break;
   1815 }

> as written in the hobbitclient.sh script, you can define you own
> bbosscript with the $BBOSSCRIPT.

I know. I thought I wrote that:

>> So all my workarounds are quite ugly since they all involve the
>> creation of directories to allow filenames like
>>
>>   hobbitclient-gnu/kfreebsd.sh
>>
>> Not nice, but works.

> /if test "$BBOSSCRIPT" = ""; then
>        BBOSSCRIPT="hobbitclient-`uname -s | tr '[A-Z]' '[a-z]'`.sh"
> fi
> /
> the difficulty is that the uname -o output contains a / character.

Yeah, indeed. Did you read the mail you're replying too?

>> There is a slash in the OS name.

> I already created a custom script for a freebsd based distro, and simply 
> creating the client script was enough.

With 4.2.0, FreeBSD seems already supported, at least the scripts
exist. I found them when debugging why GNU/kFreeBSD doesn't work.

> hope this'll help.

Not really much (except maybe the part where one of the appropriate tr
is and that uname -s instead of uname -o is used) since I already have
my client running on GNU/kFreeBSD, but the server's C code also needs
patching:

>> In noticed that the reason for this is an OS switch() in
>> hobbitd/hobbitd_client.c line 1763 ff.

... and the core of my mail is to offer Henrik (and fellow developers)
(hopefully) everything they need for upstream support, ask them for
their opinion on how the best way to handle the "/" issue and finally
ask for the official upstream inclusion of the GNU/kFreeBSD support:

>> Hernik: How do you think that problem is solved best from your view
>> as hobbit developer?

		Kind regards, Axel Beckert
-- 
Axel Beckert <beckert at phys.ethz.ch>       support: +41 44 633 2668
IT Support Group, HPR E 86.1              voice:   +41 44 633 4189
Departement Physik, ETH Zurich            fax:     +41 44 633 1239
CH-8093 Zurich, Switzerland		  http://nic.phys.ethz.ch/



More information about the Xymon mailing list