|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Module and context nameHello,
I came across a bug with the variables context definied by a module when passing parameters to the module. Command "module.sh /bazazertyuiop /bar" returns variables in the *baz* context, rather than *module.sh* Passing no parameters ends with the right context (*module.sh*) Tested with yesterdays source code of the svn, on a Fedora 11 (same issue with on Cygwin) To reproduce the bug, consider the following promise bundle agent test { commands: "/home/nicolas/foo/module.sh" args => "/bazazertyuiop /bar", module => "true", contain => outputable, comment => "Testing the module context"; "/bin/echo ${baz.foo}"; } body contain outputable { useshell => "true"; no_output => "false"; } With module.sh beeing: echo "=foo=bar"; I end up with the following result cf3 -> Executing '/home/nicolas/foo/module.sh /bazazertyuiop /bar' ...(timeout=0,owner=-1,group=-1) cf3 -> (Setting umask to 77) cf3 Defined variable: foo in context baz with value: bar cf3 M "/module.sh /baz": cf3 -> Finished script - succeeded /home/nicolas/foo/module.sh cf3 -> Completed execution of /home/nicolas/foo/module.sh /bazazertyuiop /bar cf3 -> Promiser string contains a valid executable (/bin/echo) - ok cf3 cf3 ......................................................... cf3 Promise handle: cf3 Promise made by: /bin/echo bar cf3 ......................................................... Regards, Nicolas _______________________________________________ Bug-cfengine mailing list Bug-cfengine@... https://cfengine.org/mailman/listinfo/bug-cfengine |
|
|
Re: Module and context nameok, thanks. Will fix in svn Nicolas Charles wrote: > Hello, > > I came across a bug with the variables context definied by a module when > passing parameters to the module. > Command "module.sh /bazazertyuiop /bar" returns variables in the *baz* > context, rather than *module.sh* > Passing no parameters ends with the right context (*module.sh*) > > Tested with yesterdays source code of the svn, on a Fedora 11 (same > issue with on Cygwin) > > To reproduce the bug, consider the following promise > > bundle agent test { > commands: > "/home/nicolas/foo/module.sh" > args => "/bazazertyuiop /bar", > module => "true", > contain => outputable, > comment => "Testing the module context"; > > "/bin/echo ${baz.foo}"; > } > > > body contain outputable { > useshell => "true"; > no_output => "false"; > } > > > With module.sh beeing: > echo "=foo=bar"; > > I end up with the following result > cf3 -> Executing '/home/nicolas/foo/module.sh /bazazertyuiop /bar' > ...(timeout=0,owner=-1,group=-1) > cf3 -> (Setting umask to 77) > cf3 Defined variable: foo in context baz with value: bar > cf3 M "/module.sh /baz": > cf3 -> Finished script - succeeded /home/nicolas/foo/module.sh > cf3 -> Completed execution of /home/nicolas/foo/module.sh > /bazazertyuiop /bar > cf3 -> Promiser string contains a valid executable (/bin/echo) - ok > cf3 > cf3 ......................................................... > cf3 Promise handle: > cf3 Promise made by: /bin/echo bar > cf3 ......................................................... > > Regards, > Nicolas > > _______________________________________________ > Bug-cfengine mailing list > Bug-cfengine@... > https://cfengine.org/mailman/listinfo/bug-cfengine -- Mark Burgess ------------------------------------------------- Professor of Network and System Administration Oslo University College, Norway Personal Web: http://www.iu.hio.no/~mark Office Telf : +47 22453272 ------------------------------------------------- _______________________________________________ Bug-cfengine mailing list Bug-cfengine@... https://cfengine.org/mailman/listinfo/bug-cfengine |
| Free embeddable forum powered by Nabble | Forum Help |