Package: nbd-client Version: 1:3.2-2 Severity: minor Tags: patch Dear Maintainer,
Please consider making the following changes (in this form, or another) to the init script and config file. The config file change's purpose is mostly documenting the existence of NBD_NAME, and the fact NBD_PORT is optional with NBD_NAME. The init script change allows NBD_PORT to be unspecified (i.e. default), and complains if both NBD_PORT and NBD_NAME are missing. Without this change, the init script fails if NBD_PORT is empty or unset. Kind regards, Rogier. Change 1: nbd-client config file ------------------------------------------- --- /usr/share/nbd-client/nbd-client.cf.orig 2012-12-20 22:47:53.000000000 +0100 +++ /usr/share/nbd-client/nbd-client.cf 2013-01-30 14:36:05.000000000 +0100 @@ -18,16 +18,20 @@ # The host on which the nbd-server process is running NBD_HOST[0]= # -# The port on which this client needs to connect +# The port on which this client needs to connect. Optional for +# new-style exports (which use a single port, and export names). NBD_PORT[0]= # +# The name of the export. Required for new-style exports. +NBD_NAME[0]= +# # Any extra parameters you would want to specify NBD_EXTRA[0]= # The second networked block device could look like: # NBD_DEVICE[1]=/dev/nbd1 # NBD_TYPE[1]="f" # NBD_HOST[1]="localhost" -# NBD_PORT[1]="1235" +# NBD_NAME[1]="disk1" # # You can add as many as you want, but don't skip any number in the variable # names, or the initscript will fail. ------------------------------------------- Change 2: init script ------------------------------------------- --- /etc/init.d/nbd-client.orig 2013-01-30 10:37:35.000000000 +0100 +++ /etc/init.d/nbd-client 2013-01-30 14:21:12.000000000 +0100 @@ -105,17 +105,16 @@ then echo "${NBD_DEVICE[$i]} already connected, skipping..." else - if [ ! -z "${NBD_NAME[$i]}" ] + if [ -z "${NBD_NAME[$i]}" -a -z "${NBD_PORT[$i]}" ] then - name="-N ${NBD_NAME[$i]}" + echo "Either NBD_NAME or NBD_PORT must be specified for ${NBD_DEVICE[$i]}" else - name="" - fi - if $DAEMON "${NBD_HOST[$i]}" $name "${NBD_PORT[$i]}" "${NBD_DEVICE[$i]}" ${NBD_EXTRA[$i]} - then - echo "connected ${NBD_DEVICE[$i]}" - else - echo "could not connect ${NBD_DEVICE[$i]}" + if $DAEMON "${NBD_HOST[$i]}" ${NBD_NAME[$i]:+-N "${NBD_NAME[$i]}"} ${NBD_PORT[$i]: +"${NBD_PORT[$i]}"} "${NBD_DEVICE[$i]}" ${NBD_EXTRA[$i]} + then + echo "connected ${NBD_DEVICE[$i]}" + else + echo "could not connect ${NBD_DEVICE[$i]}" + fi fi fi i=$(($i + 1)) ------------------------------------------- -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages nbd-client depends on: ii debconf [debconf-2.0] 1.5.46 ii initscripts 2.88dsf-34 ii libc6 2.13-37 nbd-client recommends no packages. nbd-client suggests no packages. -- debconf information excluded -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org