Bug #8850
Packages that start on sync are started multiple times at boot
100%
Description
When /etc/rc.start_packages is run, for example at boot time, it performs a package sync with sync_package() and then its service is started with start_service(). The problem is that packages may already start the service on their own during their sync_package() call, thus leading to multiple starts unintentionally.
Related to #8620
History
#1
Updated by Jim Pingle over 2 years ago
- Status changed from New to In Progress
#2
Updated by Jim Pingle over 2 years ago
- Status changed from In Progress to Feedback
- % Done changed from 0 to 100
Applied in changeset 5d4f49000654fae594144abc36fe8a588a028510.
#3
Updated by Jim Pingle over 2 years ago
- % Done changed from 100 to 0
For an example of the change to make on packages, see https://github.com/pfsense/FreeBSD-ports/commit/aa78e490fe92d5640a742bbe77012a5ba626b084#diff-d8e79b0a6a99373429d526a362f5d787
#4
Updated by Steve Beaver over 2 years ago
- Status changed from Feedback to Resolved
Tested with arpwatch installing fresh, configuring and multiple reboots
#5
Updated by Jim Pingle over 2 years ago
- Status changed from Resolved to 13
Looks like one line of the fix didn't make it into the final commit. Will push a correction momentarily after re-testing.
#6
Updated by Jim Pingle over 2 years ago
- Status changed from 13 to Feedback
- % Done changed from 0 to 100
Applied in changeset 880107d21f5e69201ba810d553d948ca9009f70d.
#7
Updated by Jim Pingle over 2 years ago
- Status changed from Feedback to Resolved
Allow packages to opt out of a forced start. Fixes #8850
If a package performs its own service start during its sync process,
then add <starts_on_sync/> to its service definition in the package XML
file. Then when rc.start_packages is called, the forced start will not
happen since the sync will have taken that action already.