reopen 545242
thanks

Gerrit Pape <p...@smarden.org> writes:

> On Sun, Sep 06, 2009 at 01:47:43AM +0300, Jari Aalto wrote:
>
>> Dropbear installs few directories and symlinks that
>> do not belong to /etc:
>> 
>>     /etc/dropbear/log
>>     /etc/dropbear/log/main
>>     /etc/dropbear/log/run
>>     /etc/dropbear/run
>> 
>> anything else than configuration files to /etc.  The logs should go to
>> /var/log (and no symlinks under /etc/dropbear).
>> 
>> See FHS
>> http://www.pathname.com/fhs/pub/fhs-2.3.html#ETCHOSTSPECIFICSYSTEMCONFIGURATION
>
> I think these files in the dropbear package are just fine with the FHS.
>
>  /etc/dropbear/log
>  is a directory with configuration files
>
>  /etc/dropbear/log/main
>
>  is a symbolic link to the log directory, which by default resides in
>  /var/log/.  You can change the location of the log directory, and adjust
>  the symlink to adapt the log service's configuration.

    lrwxrwxrwx 1 root root   17 Jul 21 15:18 main -> /var/log/dropbear

A symlink is not a "configuration file" because:

- that cannot be stored off-site
- Can't be backup'd with any too (like zip)
- Can't be put under version control (try RCS)
- It cannot be diff'd against other configurations.
- someone deletes the symlink, what happens?

A well behaving program read separate *.conf that allows setting the log
directory:

    logdir = /var/log

>  /etc/dropbear/log/run
>  is a configuration file that allows to configure the log service

It appears to be an executable and not a static configuration file as
per FHS:

    /etc/dropbear/log# ls -la
    total 12
    drwxr-xr-x 2 root root 4096 Jul 21 15:31 .
    drwxr-xr-x 3 root root 4096 Jul 21 15:31 ..
    lrwxrwxrwx 1 root root   17 Jul 21 15:18 main -> /var/log/dropbear
    -rwxr-xr-x 1 root root   53 Aug 10  2007 run

> I don't think separating 'configuaration' from 'executable' for scripts
> as simple as
>
>  #!/bin/sh
>  exec 2>&1
>  exec dropbear -d ./dropbear_dss_host_key -r ./dropbear_rsa_host_key -F -E -p 
> 22

The shell scripts can read separate user configuration. This is the
recommended practise:

    -----------------------------------------------------------------------

    # /etc/dropbear/run.conf
    # These are the default options. See dropbear(1) for more
    # information
    #
    # KEY_OPTS="-d ./dropbear_dss_host_key -r ./dropbear_rsa_host_key"
    # RUN_OPTS=" -F -E -p 22"

    -----------------------------------------------------------------------

    #!/bin/sh
    # location: /var/lib/dropbear/run

    KEY_OPTS="-d ./dropbear_dss_host_key -r ./dropbear_rsa_host_key"
    RUN_OPTS=" -F -E -p 22"
    CONF=/etc/dropbear/run.conf

    [ ! -f $CONF ] || . $CONF

    exec 2>&1
    exec dropbear  $KEY_OPTS $RUN_OPTS

    # End of file

>  #!/bin/sh
>  exec chpst -udropbearlog svlogd -tt ./main

Likewise.

> /etc/init.d/* scripts also are executables and configuration files at
> the same time.

This is not comparable. The scripts inside /etc/ini.d/ are de facto and
have defined meaning from years passed. In Debian they behave cleanly
and read separate configuration from /etc/default/<program>.

Jari



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to