Project

General

Profile

Bug #53

Some packages with RC scripts start twice at bootup

Added by Jim Pingle over 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Package System
Target version:
Start date:
08/18/2009
Due date:
% Done:

0%

Estimated time:
Affected Version:
All
Affected Architecture:

Description

Some packages like snort startup on package sync, and they create and RC script.

This means that when packages are sync'd at boot, they are started, and then the RC script is called which starts them again.

In the case of snort, this makes it either fail or start twice, depending on timing. If blocking is enabled with snort, snort2c never seems to start properly in this scenario.

I'm trying to come up with a feasible way to detect this scenario and work around it. Ideas are welcome.

Associated revisions

Revision 1f0f301c (diff)
Added by Jim Pingle about 9 years ago

Make /var/run/booting exist for more of the actual booting process. Ticket #53.

Revision 24d5fc0a (diff)
Added by Jim Pingle about 9 years ago

Fix booting checks. Part of ticket #53.

History

#1 Updated by Jim Pingle over 9 years ago

I was able to at least get snort to behave better by changing its startup routine slightly:
https://rcs.pfsense.org/projects/pfsense-packages/repos/mainline/commits/06218f27a5575310206dcbca0ee8cfb6a5344e54

However, larger issue will take some more thought.

My current line of thinking is to move the deletion of /var/run/booting from rc.bootup to the end of rc, as that is really when the boot process is complete.

As a consequence, the package sync routines would then be able to check for that file and refrain from starting the service if needed. On a test VM, this worked out pretty well. I'll make up some patches and attach them later.

#2 Updated by Chris Buechler about 9 years ago

  • Project changed from pfSense Packages to pfSense

#3 Updated by Chris Buechler about 9 years ago

  • Category set to Package System
  • Target version set to 2.0
  • Affected Version set to All

#4 Updated by Jim Pingle about 9 years ago

I've done all I can think of to do in the base system for this, the rest is up to package maintainers.

If a package sees {$g['varrun_path']}/booting, it should sync, write its rc file, but not stop/start.

#5 Updated by Jim Pingle about 9 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF