Bug 161168 - security/barnyard2 update: multi-conf might break status/restart
Summary: security/barnyard2 update: multi-conf might break status/restart
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Gabor Kovesdan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-30 19:30 UTC by Michael Scheidell
Modified: 2011-10-12 01:51 UTC (History)
0 users

See Also:


Attachments
file.diff (677 bytes, patch)
2011-09-30 19:30 UTC, Michael Scheidell
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Scheidell 2011-09-30 19:30:05 UTC
new multi-conf options for barnyard2 rc file may not support status and/or restart.

example:

barnyard2_1.conf= (something)
barnyard2_2.conf= (something else)

service barnyard status works BUT: only gives you rc0 or rc=1 depending on status of the LAST service. (ie: if 1.conf is offline, but 2.conf is running, you get rc=0 )

start, stop, reload, all seem to work.
: reload will not reload 1.conf if its offline.  this fixes that.

restart only restarts the first conf.

Additionally, this patch adds the ability to look at, monitor, start, stop, do status on a subset of *.conf.

service barnyard2 status
(status of all conf's)

service barnyard2 status 
lan:barnyard2 is running as pid 25360.
wan:barnyard2 is running as pid 25365.


this add this:

service barnyard2 status lan

service barnyard2 status lan
lan:barnyard2 is running as pid 25360.


you can start/stop, reload, restart get status on individual instances.

Fix: this patch:

Not sure if you want to bump portsrevision, no need to force people using single conf to update.  someone would only update if they needed this functionality.
maintainers decision.

parses option $2, unsets rc and pid stuff from rc.subr so restart/reload/ works.
adds 'stateful' status of rc on exit.



Patch attached with submission follows:
How-To-Repeat: start a multi conf barnyard2.

kill (manually) the first one.

restart/reload/status don't act like you want.
Comment 1 Edwin Groothuis freebsd_committer 2011-09-30 19:30:17 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gabor

gabor@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer 2011-09-30 19:30:22 UTC
Maintainer of security/barnyard2,

Please note that PR ports/161168 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/161168

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer 2011-09-30 19:30:25 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 pauls 2011-09-30 20:00:17 UTC
The patch is approved.  I agree with Michael.  No need to bump portrevision.

-- 
Paul Schmehl (pauls@utdallas.edu)
Senior Information Security Analyst
The University of Texas at Dallas
http://www.utdallas.edu/infosecurity/
Comment 5 dfilter service freebsd_committer 2011-10-12 01:48:22 UTC
gabor       2011-10-12 00:48:13 UTC

  FreeBSD ports repository

  Modified files:
    security/barnyard2/files barnyard2.sh.in 
  Log:
  - Fix support of status and restart for multi-config rc script
  
  PR:             ports/161168
  Submitted by:   Michael Scheidell <scheidell@secnap.net>
  Approved by:    Paul Schmehl <pauls@utdallas.edu> (maintainer)
  
  Revision  Changes    Path
  1.4       +6 -1      ports/security/barnyard2/files/barnyard2.sh.in
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Gabor Kovesdan freebsd_committer 2011-10-12 01:51:25 UTC
State Changed
From-To: feedback->closed

Committed, thanks!