ports/83089: [PATCH] irc/ircd-hybrid: fix pidfile location
Radim Kolar
hsn at netmag.cz
Thu Jul 7 10:30:18 UTC 2005
>Number: 83089
>Category: ports
>Synopsis: [PATCH] irc/ircd-hybrid: fix pidfile location
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Jul 07 10:30:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Radim Kolar
>Release: FreeBSD 5.4-STABLE i386
>Organization:
Sanatana Dharma
>Environment:
System: FreeBSD sanatana.dharma 5.4-STABLE FreeBSD 5.4-STABLE #13: Sat Jul 2 13:14:50 CEST
>Description:
old pidfile location was in this port broken anyway, so i have
changed it to standard /var/run directory, since i have /usr
mounted ro
Port maintainer (so14k at so14k.com) is cc'd.
Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:
--- ircd-hybrid-7.0.2_2.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/irc/ircd-hybrid/Makefile /home/hsn/hacked/ircd-hybrid/Makefile
--- /usr/ports/irc/ircd-hybrid/Makefile Wed Jan 19 16:01:37 2005
+++ /home/hsn/hacked/ircd-hybrid/Makefile Thu Jul 7 11:39:46 2005
@@ -7,7 +7,7 @@
PORTNAME= ircd-hybrid
PORTVERSION= 7.0.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= irc ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= ircd-hybrid
diff -ruN --exclude=CVS /usr/ports/irc/ircd-hybrid/files/include-config.h.pre-patch /home/hsn/hacked/ircd-hybrid/files/include-config.h.pre-patch
--- /usr/ports/irc/ircd-hybrid/files/include-config.h.pre-patch Fri Jul 2 08:51:46 2004
+++ /home/hsn/hacked/ircd-hybrid/files/include-config.h.pre-patch Thu Jul 7 11:42:51 2005
@@ -1,5 +1,5 @@
---- include/config.h.orig Thu Feb 6 01:46:11 2003
-+++ include/config.h Thu Jan 29 20:16:13 2004
+--- include/config.h.orig Sun Oct 26 03:08:12 2003
++++ include/config.h Thu Jul 7 11:27:45 2005
@@ -90,7 +90,9 @@
/*#define IRCD_PREFIX "IRCD$BASEDIR:"*/
#define DPATH "IRCD$BASEDIR:"
@@ -10,7 +10,7 @@
#define LOGPATH "IRCD$LOGDIR:"
#undef MODPATH
-@@ -134,13 +136,13 @@
+@@ -137,13 +139,13 @@
/* dirs */
#define DPATH IRCD_PREFIX
#define BINPATH IRCD_PREFIX "/bin/"
@@ -30,3 +30,12 @@
/* files */
#define SPATH BINPATH "/ircd" /* ircd executable */
+@@ -158,7 +160,7 @@
+ #define RPATH ETCPATH "/ircd.rsa" /* ircd rsa private keyfile */
+ #define MPATH ETCPATH "/ircd.motd" /* MOTD file */
+ #define LPATH LOGPATH "/ircd.log" /* ircd logfile */
+-#define PPATH ETCPATH "/ircd.pid" /* pid file */
++#define PPATH "/var/run/ircd.pid" /* pid file */
+ #define OPATH ETCPATH "/opers.motd" /* oper MOTD file */
+ #define LIPATH ETCPATH "/links.txt" /* cached links file */
+ #endif /* !VMS */
diff -ruN --exclude=CVS /usr/ports/irc/ircd-hybrid/files/ircd-hybrid.sh /home/hsn/hacked/ircd-hybrid/files/ircd-hybrid.sh
--- /usr/ports/irc/ircd-hybrid/files/ircd-hybrid.sh Wed Jan 7 12:04:11 2004
+++ /home/hsn/hacked/ircd-hybrid/files/ircd-hybrid.sh Thu Jul 7 11:34:08 2005
@@ -1,14 +1,19 @@
#!/bin/sh
+PIDFILE=/var/run/ircd.pid
+
if [ $# -eq 0 -o x$1 = xstart ]; then
if [ -x %PREFIX%/bin/ircd ]; then
+ touch $PIDFILE
+ chown ircd $PIDFILE
su -fm ircd -c %PREFIX%/bin/ircd && echo ' ircd'
fi
fi
if [ x$1 = xstop ]; then
- if [ -f %PREFIX%/etc/ircd.pid ]; then
- kill `cat %PREFIX%/etc/ircd.pid`
+ if [ -s $PIDFILE ]; then
+ kill `cat $PIDFILE`
else
# oh well
killall ircd
fi
+ rm -f $PIDFILE
fi
--- ircd-hybrid-7.0.2_2.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list