Bug 169047 - [rc.subr] [patch] /etc/rc.subr not checking some scripts (e.g. ruby running 'thin')
Summary: [rc.subr] [patch] /etc/rc.subr not checking some scripts (e.g. ruby running '...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: Hiroki Sato
Keywords: patch-ready
Depends on:
Reported: 2012-06-14 04:30 UTC by Tassilo Philipp
Modified: 2018-05-23 10:28 UTC (History)
5 users (show)

See Also:

file.diff (626 bytes, patch)
2012-06-14 04:30 UTC, Tassilo Philipp
no flags Details | Diff
etc-rc.subr.patch.txt (598 bytes, patch)
2014-03-11 11:09 UTC, geoff
no flags Details | Diff
deduplicate the procnamebn variable by moving it outside the if-then-else block (763 bytes, patch)
2017-05-18 12:04 UTC, Ralf van der Enden
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tassilo Philipp 2012-06-14 04:30:05 UTC
I wrote a rc.d script to handle 'thin' processes on startup, however I couldn't stop it using "/etc/rc.d/thin stop". Check /etc/rc.subr, I noticed that "find_processes" looks for something in the ps output like:

5570      0 ruby19: /usr/local/bin/thin server ( (ruby19)

whereas in my case, it is:

5570      0 ruby19: thin server ( (ruby19)

Find attached a patch that would fix the problem.

For reference, here is my /etc/rc.d/thin:

# PROVIDE: thin

. /etc/rc.subr

# Defaults.


command_args="start -d -c ${app_path}/current -p 80 -e production"


# Crucial (!) for execjs to find js runtime.

load_rc_config $name
run_rc_command "$1"
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-06-17 23:35:47 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Over to maintainer(s).
Comment 2 geoff 2014-03-11 11:04:22 UTC
Any idea when this might get included, its not in FreeBSD 10-RELEASE.
Comment 3 geoff 2014-03-11 11:09:44 UTC
Heres an updated copy of the patch if that helps.
Comment 4 John Marino freebsd_committer 2014-07-28 12:52:10 UTC
it does help.
Comment 5 John Marino freebsd_committer 2014-07-28 12:54:35 UTC
sorry, I thought this was a port.  I just realized it's a base PR.
Comment 6 Hiroki Sato freebsd_committer 2014-11-03 23:47:45 UTC
Comment 7 Ralf van der Enden 2017-05-18 12:04:15 UTC
Created attachment 182691 [details]
deduplicate the procnamebn variable by moving it outside the if-then-else block

I have the exact same issue with several Python programs running in the background. My patch moves the original declaration of procnamebn outside the if-then-else block to avoid duplication.

Any chance this will be merged with HEAD in the very near future ? (I'm asking since this PR is quite old)
Comment 8 Eitan Adler freebsd_committer freebsd_triage 2018-05-23 10:28:02 UTC
batch change of PRs untouched in 2018 marked "in progress" back to open.