[OpenIndiana-discuss] setting autofs-props/environment variable

Udo Grabowski (IMK) udo.grabowski at kit.edu
Mon Aug 8 16:28:44 UTC 2016


On 08/08/2016 18:26, Peter Tribble wrote:
> On Mon, Aug 8, 2016 at 5:03 PM, Udo Grabowski (IMK) <udo.grabowski at kit.edu>
> wrote:
>
>> Hi,
>> does anyone know how to set more than one environment variable
>> with sharectl autofs-props/environment ?
>>
>> Tried several variants (all one-liners):
>> sharectl set -p environment=
>>     ...               "ENV1=VAL1 ENV2=VAL2"    autofs
>>     ...               "ENV1=VAL1\nENV2=VAL2"   autofs
>>     ...               "ENV1=VAL1:ENV2=VAL2"    autofs
>>     ...               "ENV1=VAL1^MENV2=VAL2"   autofs
>>
>> where ^M is a literal CR, which was accepted, but gave funny
>> output on svcprop and didn't exactly do what I wanted...
>> The autofs manpage only says:
>>
>>       AUTOMOUNTD_ENV=<name>=<value>
>>
>>           Environment variables. Each  environment  variable-value
>>           pairing  must be on its own line. You can specify multi-
>>           ple such pairings. There  are  no  environment  variable
>>           settings supplied. For example: AUTOMOUNTD_ENV=DAY=TUES
>>
>
> That's odd. The autofs manpage on my systems says:
>
>       environment=name=value[,name=value]...
>               Specifies a comma separated list of environment variables. If
> an
>               environment variable has more than one value, those values
> should
>               be separated with a comma, preceded by a backslash as an escape
>               character ("\,").  For example:
>
>                     VAR1=val1,VAR2=val2\,val3
>
> So I think you just want commas.
>

Yes, that's it ! Old manpage is on OI 151a9,  instead I just red the source
where I also found the comma at the very end of
<https://github.com/illumos/illumos-gate/blob/master/usr/src/cmd/fs.d/autofs/auto_subr.c>

Thanks a lot !
-- 
Dr.Udo Grabowski   Inst.f.Meteorology & Climate Research IMK-ASF-SAT
http://www.imk-asf.kit.edu/english/sat.php
KIT - Karlsruhe Institute of Technology           http://www.kit.edu
Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026



More information about the openindiana-discuss mailing list