diff options
author | Roy Marples <uberlord@gentoo.org> | 2007-07-26 11:29:54 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2007-07-26 11:29:54 +0000 |
commit | 11e0eb19c7ff11a8a35d9539ea1c3264d2c6c514 (patch) | |
tree | 62f0c84df1effaccf304f22601c3a40e85820639 /net-dns/noip-updater | |
parent | Unmask net-p2p/deluge (diff) | |
download | gentoo-2-11e0eb19c7ff11a8a35d9539ea1c3264d2c6c514.tar.gz gentoo-2-11e0eb19c7ff11a8a35d9539ea1c3264d2c6c514.tar.bz2 gentoo-2-11e0eb19c7ff11a8a35d9539ea1c3264d2c6c514.zip |
Daemonise properly, #185471.
(Portage version: 2.1.3_rc9)
Diffstat (limited to 'net-dns/noip-updater')
-rw-r--r-- | net-dns/noip-updater/ChangeLog | 8 | ||||
-rw-r--r-- | net-dns/noip-updater/files/digest-noip-updater-2.1.4-r1 | 3 | ||||
-rw-r--r-- | net-dns/noip-updater/files/noip-2.1.4-daemon.patch | 21 | ||||
-rw-r--r-- | net-dns/noip-updater/noip-updater-2.1.4-r1.ebuild | 59 |
4 files changed, 90 insertions, 1 deletions
diff --git a/net-dns/noip-updater/ChangeLog b/net-dns/noip-updater/ChangeLog index b8449db9594e..ff8f10467e2a 100644 --- a/net-dns/noip-updater/ChangeLog +++ b/net-dns/noip-updater/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-dns/noip-updater # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/noip-updater/ChangeLog,v 1.22 2007/05/06 09:13:37 genone Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/noip-updater/ChangeLog,v 1.23 2007/07/26 11:29:54 uberlord Exp $ + +*noip-updater-2.1.4-r1 (26 Jul 2007) + + 26 Jul 2007; Roy Marples <uberlord@gentoo.org> + +files/noip-2.1.4-daemon.patch, +noip-updater-2.1.4-r1.ebuild: + Daemonise properly, #185471. 06 May 2007; Marius Mauch <genone@gentoo.org> noip-updater-2.1.1-r1.ebuild, noip-updater-2.1.3.ebuild, diff --git a/net-dns/noip-updater/files/digest-noip-updater-2.1.4-r1 b/net-dns/noip-updater/files/digest-noip-updater-2.1.4-r1 new file mode 100644 index 000000000000..927f3e502e3b --- /dev/null +++ b/net-dns/noip-updater/files/digest-noip-updater-2.1.4-r1 @@ -0,0 +1,3 @@ +MD5 d65e221016a61cd4e412242c34c71ff1 noip-2.1.4.tar.gz 102789 +RMD160 77960ab3e9b87eac843408831ae45e297e7effc8 noip-2.1.4.tar.gz 102789 +SHA256 8912301be611b842d0cf1a335275c367f3a80d507bc53c7460c68b52d71b1a7c noip-2.1.4.tar.gz 102789 diff --git a/net-dns/noip-updater/files/noip-2.1.4-daemon.patch b/net-dns/noip-updater/files/noip-2.1.4-daemon.patch new file mode 100644 index 000000000000..73c26e4d1b93 --- /dev/null +++ b/net-dns/noip-updater/files/noip-2.1.4-daemon.patch @@ -0,0 +1,21 @@ +diff -ur a/noip2.c b/noip2.c +--- a/noip2.c 2004-01-09 14:18:39.000000000 +0000 ++++ b/noip2.c 2007-07-20 14:02:41.100377515 +0100 +@@ -894,16 +894,13 @@ + int x, delay; + char *err_string; + +- x = fork(); ++ x = daemon (0, 0); + switch (x) { + case -1: // error + err_string = strerror(errno); + Msg( "Can't fork!! (%s) Ending!\n", err_string); + return FATALERR; +- default: // parent +- exit(0); + case 0: //child +- setsid(); + if (get_shm_info() == FATALERR) + return FATALERR; + log2syslog++; diff --git a/net-dns/noip-updater/noip-updater-2.1.4-r1.ebuild b/net-dns/noip-updater/noip-updater-2.1.4-r1.ebuild new file mode 100644 index 000000000000..e4ef4a2e0428 --- /dev/null +++ b/net-dns/noip-updater/noip-updater-2.1.4-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-dns/noip-updater/noip-updater-2.1.4-r1.ebuild,v 1.1 2007/07/26 11:29:54 uberlord Exp $ + +inherit eutils toolchain-funcs + +IUSE="" + +MY_P=${P/-updater/} +S=${WORKDIR}/${MY_P} +DESCRIPTION="no-ip.com dynamic DNS updater" +HOMEPAGE="http://www.no-ip.com" +SRC_URI="http://www.no-ip.com/client/linux/${MY_P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" + +RDEPEND="virtual/libc" + +DEPEND="${RDEPEND} sys-devel/gcc" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/noip-2.1.3-cflags.patch + epatch "${FILESDIR}"/noip-2.1.4-daemon.patch + sed -i \ + -e "s:\(#define CONFIG_FILEPATH\).*:\1 \"/etc\":" \ + -e "s:\(#define CONFIG_FILENAME\).*:\1 \"/etc/no-ip2.conf\":" \ + noip2.c || die +} + +src_compile() { + emake \ + CC=$(tc-getCC) \ + PREFIX=/usr \ + CONFDIR=/etc || die +} + +src_install() { + into /usr + dosbin noip2 + dodoc README.FIRST COPYING + newinitd "${FILESDIR}"/noip2.start noip +} + +pkg_postinst() { + elog "Configuration can be done manually via:" + elog "/usr/sbin/noip2 -C or " + elog "first time you use the /etc/init.d/noip script; or" + elog "by using this ebuild's config option." +} + +pkg_config() { + cd /tmp + einfo "Answer the following questions." + noip2 -C || die +} |