Koozali.org: home of the SME Server

config setprop question

guest22

config setprop question
« on: December 31, 2012, 10:23:55 AM »
Hi,

Is there a way to set a db key with multiple values? By default it only accepts 1 value?

I'm trying to set this:

config setprop InternalInterface NICBondingOptions=miimon=200 mode=active-backup

but it is being refused because of =miimon=200 mode=active-backup

By default a servceonly mode SME Server has this setting in the database.

TIA

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: config setprop question
« Reply #1 on: December 31, 2012, 11:13:00 AM »
Hi

search here in teh forums and in Dev's ML, I'm sure you'll find something.. I've asked something similar some (..1 year? 2? boh) time ago

guest22

Re: config setprop question
« Reply #2 on: December 31, 2012, 11:38:25 AM »
I've looked at the migrate fragments to see how it's done ;-)

config setprop key prop1 'val1 val2 val3 val4'

put the desired value string between single quotes.

Thanks.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: config setprop question
« Reply #3 on: December 31, 2012, 03:48:58 PM »
Hi,

Is there a way to set a db key with multiple values? By default it only accepts 1 value?

I'm trying to set this:

config setprop InternalInterface NICBondingOptions=miimon=200 mode=active-backup

but it is being refused because of =miimon=200 mode=active-backup

This is a basic 'shell' command line issue, nothing to do with the SME software per se.

You want to have a 'val' which contains a space - i.e. you don't want the space to be interpreted by the shell as a separator between arguments. You need to use either single or double quote characters to protect the space in "miimon=200 mode=active-backup" from interpretation by the shell.

You need:

config setprop InternalInterface NICBondingOptions "miimon=200 mode=active-backup"

or

config setprop InternalInterface NICBondingOptions 'miimon=200 mode=active-backup'

BTW, you are not trying to set the property to 'multiple values' - just to a single value - a string which contains a space.