init.d-script in 2.4.33pre?

Bas van Schaik <[email protected]> Sat, 18 Mar 2006 14:41:19 +0100
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
Hi Peter,

I found the following lines in nbd/etc/init.d/enbd:

> OLD_CONFIG="${ENBD_CONFIG-/etc/enbd.conf}"
> SERVER_CONFIG="${ENBD_SERVER_CONFIG-/etc/enbd-server.conf}"
> CLIENT_CONFIG="${ENBD_CLIENT_CONFIG-/etc/enbd-client.conf}"
> # adjust
> if [ ! -r $SERVER_CONFIG ]; then
>     SERVER_CONFIG=${NBD_CONFIG}
> fi
> if [ ! -r $CLIENT_CONFIG ]; then
>     CLIENT_CONFIG=${ENBD_CONFIG}
> fi

I think
> ...
>     SERVER_CONFIG=${NBD_CONFIG}
> ...

Should be replaced by
> ...
>     SERVER_CONFIG=${ENBD_CONFIG}
> ...

I assume those "variables" should be replaced with real values during
the build process, but I cannot find a makefile which processes this
"template" file.

Also, in nbd/enbd_conf.h:
> #ifndef CONFDIR
> # define CONFDIR "/etc"
> #endif /* CONFDIR */
> 
> /* old combined file  - fallback to this if others not there */
> #ifndef ENBD_CONFIG_FILE
> # define ENBD_CONFIG_FILE        CONFDIR "/enbd.conf"
> #endif /* ENBD_CONFIG_FILE */
> 
> #ifndef ENBD_SERVER_CONFIG_FILE
> # define ENBD_SERVER_CONFIG_FILE CONFDIR "enbd-server.conf"
> #endif /* ENBD_SERVER_CONFIG_FILE */
> 
> #ifndef ENBD_CLIENT_CONFIG_FILE
> # define ENBD_CLIENT_CONFIG_FILE CONFDIR "enbd-client.conf"
> #endif /* ENBD_CLIENT_CONFIG_FILE */

I think
> define ENBD_CLIENT_CONFIG_FILE CONFDIR "enbd-client.conf"
and
> define ENBD_SERVER_CONFIG_FILE CONFDIR "enbd-server.conf"

Should be replaced by
> define ENBD_CLIENT_CONFIG_FILE CONFDIR "/enbd-client.conf"
and
> define ENBD_SERVER_CONFIG_FILE CONFDIR "/enbd-server.conf"

(or a trailing slash should be added to CONFDIR, whatever you prefer)


In general: is there something like a bug tracking system for enbd? I
can't find one on the website, and I think it can be very useful,
because more and more people are using enbd. If necessary I can arrange
a bugzilla/flyspray/whatever installation on a stable location, so just
let me know.

--Bas