Summary: | net-irc/inspircd initscript won't stop and rehash the service | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Tiger <gothiger> |
Component: | Current packages | Assignee: | Michael Hanselmann (hansmi) (RETIRED) <hansmi> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | brain, esycat |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
ebuild patch for --bin-dir -> --binary-dir
init.d patch based on new init.d by Tiger inspircd-1.1.13.ebuild without white spacing Patch for inspircd initscript Patch for inspircd initscript (without spaces) |
Description
Tiger
2007-10-03 21:25:57 UTC
Craig, can you please fix this and provide me with a patch? its not supposed to run multiple instances from the initscript, this could be the problem. There should probably be a check for already running. I made a quick initscript for inspircd and it works fine : #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ depend() { need net provide ircd } start() { ebegin "Starting InspIRCd" start-stop-daemon --start --quiet --chuid inspircd \ --exec /usr/bin/inspircd \ --pidfile /var/run/inspircd.pid --make-pidfile -- \ --logfile /var/log/inspircd/ircd.log &>/dev/null sleep 1 echo `pidof inspircd` > /var/run/inspircd.pid eend $? } stop() { ebegin "Stopping InspIRCd" start-stop-daemon --stop --quiet --pidfile /var/run/inspircd.pid eend $? } For rehash function, we need to keep the inspircd launcher, maybe in /usr/bin/inspircd.launcher (I think a simlink to /usr/lib/inspircd/inspircd.launcher/inspird is a bad solution). The launcher is broken in current ebuild, the ./configure --bin-dir option has moved to --binary-dir The configure flag never was --bin-dir, therefore its always been broken. Hansmi, can we incorporate Tiger's fixed initscript into the ebuild? Thanks (In reply to comment #4) > The configure flag never was --bin-dir, therefore its always been broken. > Hansmi, can we incorporate Tiger's fixed initscript into the ebuild? I can integrate both fixes if you give me diffs/patches. I don't run InspIRCd myself and therefore couldn't test these changes. Thanks a lot. Created attachment 132599 [details, diff]
ebuild patch for --bin-dir -> --binary-dir
Created attachment 132600 [details, diff]
init.d patch based on new init.d by Tiger
hope these are what you need (In reply to comment #8) > hope these are what you need I applied the patch for the ebuild. The init.d patch does whitespace changes for no reason and `pidof inspircd` can lead to conflicts. Why rewrite the pid file at all? This is tiger's suggested code made into a diff. Ask him why he reformatted it as text? I don't see why the spacing type matters in the initscript. I don't know shellscript personally, so i can't write this script myself. If it had been down to me there probably wouldnt be an initscript in the ebuild, however i didnt write the initial code for it. (In reply to comment #10) > This is tiger's suggested code made into a diff. Ask him why he reformatted it > as text? I don't see why the spacing type matters in the initscript. It does, see http://devmanual.gentoo.org/ebuild-writing/file-format/index.html#indenting-and-whitespace > I don't know shellscript personally, so i can't write this script myself. > > If it had been down to me there probably wouldnt be an initscript in the > ebuild, however i didnt write the initial code for it. Since you offered to proxy-maintain, you should feel respsonsible for it. In case you think you can't do that, it's better to remove InspIRCd from Portage. Created attachment 132726 [details, diff]
inspircd-1.1.13.ebuild without white spacing
I added a line in post pkg_postinst() function, because now the inspircd launcher works and anyone could start/stop/rehash the ircd :
+ chmod -R 750 "${ROOT}"/usr/$(get_libdir)/inspircd/inspircd.launcher
Created attachment 132728 [details, diff]
Patch for inspircd initscript
The initscript works fine now with the patched ebuild. It need just one thing but I don't know how to do that : fix the library path for rehash & version function. Can we use sed in ebuild to modify the intscript and use $(get_libdir) function ?
Created attachment 135743 [details, diff]
Patch for inspircd initscript (without spaces)
Tiger's initscript works fine, but there are still spaces after patching, so I've corrected it.
Are there any more obstacles for applying these changes to portage?
There are no obstacles remaining. Any chance we can get this bumped to the latest insp version 1.1.14 while we are at it? Thanks for the patch, it's applied to CVS. Works fine on x86 and amd64 :) |