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

pkc_mls pkc_mls at yahoo.fr
Mon Jan 28 08:43:52 CET 2008


Axel Beckert a écrit :
> Hi,
>
> 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.

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

/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.

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

hope this'll help.
> In noticed that the reason for this is an OS switch() in
> hobbitd/hobbitd_client.c line 1763 ff.
>
> Back to the client:
>
> Adding a new OS in general isn't difficult with hobbit on the client
> side, you just copy some shell script, perhaps edit it and it
> works. With GNU/kFreeBSD it
> looks a little bit different:
>
>   14/0/0 root at c-metisse:pts/ttyp3 22:49:51 [~] # uname -o
>   GNU/kFreeBSD
>   15/0/0 root at c-metisse:pts/ttyp3 22:49:54 [~] # 
>
> There is a slash in the OS name. 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.
>
> The solution suggested by the GNU/kFreeBSD developers for this problem
> is to replace all slashes in the output of "uname -o" with
> underscores (written in Perlish: s(/)(_)g) so that the above example
> would look like this:
>
>   hobbitclient-gnu_kfreebsd.sh
>
> Hernik: How do you think that problem is solved best from your view as
> hobbit developer? You probably have more an idea which code may need
> to be patch. I've lost the overview at the moment, since hobbit seems
> to use the output of "uname -o" in a lot of places. Do you think, you
> can generate a patch I can test? If not: with a few pointers to most
> of the places in the source, I probably also can try to create a patch
> on my own... Alternatively I should be able to get you an account on a
> Test machine running Debian GNU/kFreeBSD. (I'm currently testing
> inside a virtual machine using QEMU/KVM.)
>
> P.S.: No, it's not for the job this time, it's for my own boxes and
> those of friends. :-)
>
> 		Kind regards, Axel Beckert
>   




More information about the Xymon mailing list