On Mon, Aug 16, 2010 at 12:14:40PM -0700, Wouter Verhelst wrote: > On Fri, Aug 13, 2010 at 12:41:30PM -0700, Vagrant Cascadian wrote: > > Package: nbd-client > > Version: 1:2.9.16-3 > > Severity: normal > > Tags: patch > > > > with no devices configured, the nbd-client init script issues the following > > warning:
perhaps no devices configured is a bit misleading... i just had the defaults. no devices intentionally configured? :) > > /etc/init.d/nbd-client: line 47: [: =: unary operator expected > > > > the following patch fixes this(at least, it doesn't issue the warning): > > > > --- nbd-client.init.d.orig 2010-08-13 14:13:49.000000000 -0500 > > +++ nbd-client.init.d 2010-08-13 14:14:29.000000000 -0500 > > @@ -43,7 +43,7 @@ > > i=0 > > while [ ! -z ${NBD_DEVICE[$i]} ] > ^ > > That one is supposed to avoid this. I really want to make sure we don't > get anything in DEVICES if that isn't necessary, otherwise we get issues > later on in the script. sure. > It's not clear to me why this would produce something, at all. What does > your config file look like? just the default configuration from when i installed it (as far as i can recall), which appears to be identical to a freshly installed nbd-client package with the defaults, and fails there too. perhaps the empty values for most configuration options, yet NBD_DEVICE being set by default is causing the problem? configuration file attached. live well, vagrant
# If you don't want to reconfigure this package after installing, uncomment # the following line: #AUTO_GEN="n" # If you don't want the init script to kill nbd-client devices that aren't # specified in this configuration file, set the following to "false": KILLALL="false" # Note that any statical settings in this file will be preserved # regardless of the setting of AUTO_GEN, so its use is only recommended # if you set things in a dynamical way (e.g., through a database) # # Name of the first used nbd /dev-entry: NBD_DEVICE[0]=/dev/nbd0 # # Type; s=swap, f=filesystem (with entry in /etc/fstab), r=raw (no other setup # than to run the client) NBD_TYPE[0]= # # The host on which the nbd-server process is running NBD_HOST[0]= # # The port on which this client needs to connect NBD_PORT[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" # # You can add as many as you want, but don't skip any number in the variable # names, or the initscript will fail.