Modify

Ticket #629 (closed defect: wontfix)

Opened 14 years ago

Last modified 12 years ago

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:1 Changed 14 years ago by solj

  • Version set to 1.0
  • Milestone set to Bcfg2 1.0 Release

comment:2 follow-up: ↓ 5 Changed 13 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 13 years ago by solj

  • Milestone changed from Bcfg2 1.0.1 Release to Bcfg2 1.1.0 Release

comment:4 Changed 12 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.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.