Ticket #629 (closed defect: wontfix)
Environment variable need to be carried to the package manager
Reported by: | tousigna | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: |
Description
The old behavior of bcfg2 did permit us to do an Action to set en environment variable in the execution of bcfg2. But since every execution turned to be done in a child process the Action do not work anymore.
Then for an <Action timing='pre' name='sudo_force_remove' when='modified' status='check' command="export SUDO_FORCE_REMOVE=yes" /> to be executed as expected i suggest to put a sub-tag to the package/Action/* named <Environment name="..." />
so the action here would be replaced to
<Package name='sudo-ldap'> <Environment name='sudo_force_remove' /> </Package>
and the rules would need also a counter-part as of
<Environment name='sudo_force_remove' pair='SUDO_FORCE_REMOVE=yes' />
Attachments
Change History
comment:2 follow-up: ↓ 5 Changed 14 years ago by desai
- Milestone changed from Bcfg2 1.0.0 Release to Bcfg2 1.0.1 Release
I'm not 100% convinced that this approach is the best one; it might be better to modify the calling script if it is needed globally. I'll leave this open for 1.0.1 for the moment though.
comment:3 Changed 14 years ago by solj
- Milestone changed from Bcfg2 1.0.1 Release to Bcfg2 1.1.0 Release
comment:4 Changed 13 years ago by solj
- Milestone changed from Bcfg2 1.1.0 Release to Bcfg2 1.2.0 Release
comment:5 in reply to: ↑ 2 Changed 12 years ago by solj
- Status changed from new to closed
- Resolution set to wontfix
Replying to desai:
I'm not 100% convinced that this approach is the best one; it might be better to modify the calling script if it is needed globally. I'll leave this open for 1.0.1 for the moment though.
This is the way to go. I think adding things on the Bcfg2 side which can be done properly in other ways causes more confusion.