Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: guest22 on December 31, 2012, 10:23:55 AM

Title: config setprop question
Post by: guest22 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
Title: Re: config setprop question
Post by: Stefano 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
Title: Re: config setprop question
Post by: guest22 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.
Title: Re: config setprop question
Post by: CharlieBrady 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.