Modify ↓
Ticket #1000 (closed defect: wontfix)
Upstart services cannot be enabled/disabled
Reported by: | Joe Digilio <[email protected]…> | Owned by: | desai |
---|---|---|---|
Priority: | major | Milestone: | Bcfg2 1.2.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | Cc: |
Description
Enabling/disabling an upstart service at boot time is currently not possible in Bcfg2. Upstart does not provide an easy way to do this. But there are two ways I know of to disable an upstart service:
- change the "start on" line in /etc/init/<service>.conf
- mv /etc/init/<service>.conf /etc/init/<service>.conf.disabled
- rm /etc/init/<service>.conf
It seems like the best way to do this would be method 2. Upstart.py would need to do something like this to disable a service:
- Tell the client to rename /etc/init/<service>.conf to a known name, eg /etc/init/<service>.conf.disabled-by-bcfg2
- Insert into the Bundle:
<BoundPath name="/etc/init/<service>.conf" type="ignore"/> <BoundPath name="/etc/init/<service>.conf.disabled-by-bcfg2" type="ignore"/>
Maybe it would be better for the <service>.conf Path entry to be of type "nonexistent"? Of course we would need to ensure the rename occurs first.
Thoughts?
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
As far as I know, you enable/disable upstart services via the file contents of the .conf file. This is similar to the way launchd works. So, I think that doing method 1 is the choice which makes the most sense in this case. Removing/moving the file will also work, but I think it is more explicit if you simply manage that file's contents.