Bug 182294 - sysutils/fsc not forked to background at start
Summary: sysutils/fsc not forked to background at start
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: Tom Rhodes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-22 13:10 UTC by Alexey
Modified: 2014-03-11 05:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey 2013-09-22 13:10:00 UTC
root@:/home/test # pkg inf fsc
fsc-1.0.1_2
root@:/home/test # cat /usr/local/etc/fscd.conf
sshd
root@:/home/test # service fscd start
Starting fscd.
sshd is running as pid 1474.

^Cfscd: pidfile_remove: Bad file descriptor
/usr/local/etc/rc.d/fscd: WARNING: failed to start fscd

On startup system will waiting when fscd going to background while user don't hit Ctrl+C

Fix: Dirty workaround:


name="fscd"
+rcvar="fscd_enable"
+load_rc_config $name
+: ${fscd_enable="NO"}
+
 command="/usr/local/sbin/${name}"
 pidfile="/var/run/${name}.pid"
+required_files="/usr/local/etc/$name.conf"
+
+start_cmd=fscd_start
+
+fscd_start()
+{
+       /usr/sbin/daemon -cf ${command}
+}

-load_rc_config $name
 run_rc_command "$1"--50yoM2mBWFT8dDmrRlnAO82wYq8ySJfOUt7iW68S8hEZBq5H
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- /usr/local/etc/rc.d/fscd    2013-09-22 15:50:03.000000000 +0600
+++ /usr/local/etc/rc.d/fscd    2013-09-22 16:15:57.000000000 +0600
@@ -13,8 +13,19 @@
 . /etc/rc.subr
How-To-Repeat: Install sysutils/fsc from ports (current version 1.0.1_2).
Same results on 9.1-RELEASE and 10.0-ALPHA1
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-22 13:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->trhodes

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Koichiro IWAO 2014-03-11 04:01:58 UTC
Would someone please commit ports/182294?
sysutils/fsc is a useful tool except for its poor rc script.
http://www.freebsd.org/cgi/query-pr.cgi?pr=182294

-- 
`whois vmeta.jp | nkf -w`
meta <meta@vmeta.jp>
Comment 3 dfilter service freebsd_committer freebsd_triage 2014-03-11 05:24:18 UTC
Author: daichi
Date: Tue Mar 11 05:24:10 2014
New Revision: 347843
URL: http://svnweb.freebsd.org/changeset/ports/347843
QAT: https://qat.redports.org/buildarchive/r347843/

Log:
  fixed a start-up issue
  
  PR:		ports/182294
  Submitted by:	Alex <lexus@hostelnet.ru>
  Reviewed by:	Koichiro IWAO <meta@vmeta.jp>

Added:
  head/sysutils/fsc/files/
  head/sysutils/fsc/files/patch-rc.d_fscd   (contents, props changed)
Modified:
  head/sysutils/fsc/Makefile

Modified: head/sysutils/fsc/Makefile
==============================================================================
--- head/sysutils/fsc/Makefile	Tue Mar 11 05:17:43 2014	(r347842)
+++ head/sysutils/fsc/Makefile	Tue Mar 11 05:24:10 2014	(r347843)
@@ -3,7 +3,7 @@
 
 PORTNAME=	fsc
 PORTVERSION=	1.0.1
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	sysutils
 MASTER_SITES=	LOCAL
 MASTER_SITE_SUBDIR=	trhodes
@@ -17,8 +17,6 @@ PLIST_FILES=	bin/fscadm sbin/fscd etc/rc
 		man/man8/fscadm.8.gz man/man8/fscd.8.gz
 
 post-patch:
-	@${REINPLACE_CMD} -e 's|/usr|${PREFIX}|' \
-		${WRKSRC}/rc.d/fscd
 	@${REINPLACE_CMD} -e 's|/etc|${PREFIX}/etc|' \
 		${WRKSRC}/fscd/fscd.8 ${WRKSRC}/fscd/fscd.c \
 		${WRKSRC}/fscd/fscd.conf.5 ${WRKSRC}/fscadm/fscadm.c

Added: head/sysutils/fsc/files/patch-rc.d_fscd
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/fsc/files/patch-rc.d_fscd	Tue Mar 11 05:24:10 2014	(r347843)
@@ -0,0 +1,24 @@
+--- rc.d/fscd.orig	2014-03-11 14:19:18.576173326 +0900
++++ rc.d/fscd	2014-03-11 14:20:09.206171150 +0900
+@@ -13,8 +13,19 @@
+ . /etc/rc.subr
+ 
+ name="fscd"
+-command="/usr/sbin/${name}"
++rcvar="fscd_enable"
++load_rc_config $name
++: ${fscd_enable="NO"}
++
++command="/usr/local/sbin/${name}"
+ pidfile="/var/run/${name}.pid"
++required_files="/usr/local/etc/$name.conf"
++
++start_cmd=fscd_start
++
++fscd_start()
++{
++	/usr/sbin/daemon -cf ${command}
++}
+ 
+-load_rc_config $name
+ run_rc_command "$1"
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Daichi GOTO freebsd_committer freebsd_triage 2014-03-11 05:25:08 UTC
State Changed
From-To: open->closed

Committed. Thanks!