From e0911535404fe8b9f574f5cda8c02aee2e6057c5 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Fri, 9 Feb 2007 16:57:13 +0000 Subject: [PATCH] Add reload option to init script, #166095 thanks to Martin von Gagern. Package-Manager: portage-2.1.2-r9 --- net-misc/radvd/ChangeLog | 10 +++- net-misc/radvd/Manifest | 31 +++++++----- net-misc/radvd/files/digest-radvd-0.9 | 2 + net-misc/radvd/files/digest-radvd-1.0-r1 | 3 ++ net-misc/radvd/files/radvd.init | 25 ++++++++-- net-misc/radvd/radvd-1.0-r1.ebuild | 62 ++++++++++++++++++++++++ 6 files changed, 115 insertions(+), 18 deletions(-) create mode 100644 net-misc/radvd/files/digest-radvd-1.0-r1 create mode 100644 net-misc/radvd/radvd-1.0-r1.ebuild diff --git a/net-misc/radvd/ChangeLog b/net-misc/radvd/ChangeLog index c07007836afa..fd4bf1cdffbf 100644 --- a/net-misc/radvd/ChangeLog +++ b/net-misc/radvd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/radvd -# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/ChangeLog,v 1.32 2006/11/01 17:29:29 uberlord Exp $ +# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/ChangeLog,v 1.33 2007/02/09 16:57:13 uberlord Exp $ + +*radvd-1.0-r1 (09 Feb 2007) + + 09 Feb 2007; Roy Marples files/radvd.init, + +radvd-1.0-r1.ebuild: + Add reload option to init script, #166095 thanks to Martin von Gagern. 01 Nov 2006; Roy Marples ChangeLog: New version. diff --git a/net-misc/radvd/Manifest b/net-misc/radvd/Manifest index 49cb1bf2048d..8cd817f08bbf 100644 --- a/net-misc/radvd/Manifest +++ b/net-misc/radvd/Manifest @@ -10,12 +10,12 @@ AUX radvd.conf 445 RMD160 8b9a158617b7a2b11548016d98b037f203f13558 SHA1 9605bce0 MD5 7593b61c3198d961cc86dd5b85b9f44a files/radvd.conf 445 RMD160 8b9a158617b7a2b11548016d98b037f203f13558 files/radvd.conf 445 SHA256 a9c704a481fc7c24d4ed3e21aa6bf8979fca6e81b93d86a86b40e4433d03809c files/radvd.conf 445 -AUX radvd.init 1127 RMD160 7a913ba075d162d2afdb9014425cae65c8e1c4c4 SHA1 d98dad593df5256ae22814435df1cd0d64f12a65 SHA256 ca1deb129eaf20c5334577f4b4b3b7994f93de9e37d0cb067148397f34c08360 -MD5 b0153a8bb03477d043a34182baeba5ba files/radvd.init 1127 -RMD160 7a913ba075d162d2afdb9014425cae65c8e1c4c4 files/radvd.init 1127 -SHA256 ca1deb129eaf20c5334577f4b4b3b7994f93de9e37d0cb067148397f34c08360 files/radvd.init 1127 +AUX radvd.init 1472 RMD160 ed07f9deb39bb7db4fa3391994c9a68fc0b76062 SHA1 b62e36f3c753a98362f97d15c924af4cc52edbeb SHA256 4dd66ffca017fc7768d614a9afa98b91af3379bfbe00a91f35cbe7df587774ca +MD5 6ef71f9b173da8f9ad408b17c260f23e files/radvd.init 1472 +RMD160 ed07f9deb39bb7db4fa3391994c9a68fc0b76062 files/radvd.init 1472 +SHA256 4dd66ffca017fc7768d614a9afa98b91af3379bfbe00a91f35cbe7df587774ca files/radvd.init 1472 DIST radvd-0.9.1.tar.gz 104993 RMD160 844b942384c3258afe52f5645969e02cfa508322 SHA1 4adb8f780ef62acea61e2499d19a5dd78dcb1328 SHA256 d90f95b1af5a853d3cdbc15582ab219bbdd73efc4c7290759bcb895695514e1d -DIST radvd-0.9.tar.gz 104356 +DIST radvd-0.9.tar.gz 104356 RMD160 a1bc693c30d6d929dfe012a53dc22428a7022a64 SHA1 f21b4facd577f97c0275f4de5a8f0e24231f059d SHA256 751fa0e5e536c1b57cc09e63440a0f01209dc4297a3c58e69058e741ef28ea15 DIST radvd-1.0.tar.gz 110170 RMD160 a6d5aa3fe25b7751e5b0188add1d68633b20174e SHA1 142bb9d126a67215597d115ed551955e79889fad SHA256 fbc44fac8356426c115914eb5dce6fc84afea923ad6aba1670a3402c06bda7ab EBUILD radvd-0.9.1.ebuild 1675 RMD160 e3972e69153b786b1c72a29cea5baeb8bb187b49 SHA1 ceef9274f47f6e5da2a30963f26562b30d2fdce3 SHA256 b9336932eff338b43361c9679ffdefb9f192c9577e2f3b26fbd88f0c1f8cc96b MD5 f9786467b1e6f5363aeecabfb0b48b70 radvd-0.9.1.ebuild 1675 @@ -25,24 +25,31 @@ EBUILD radvd-0.9.ebuild 1485 RMD160 de15b8751ee5ca117706e1418c7fa9c2b627bea8 SHA MD5 fcfa14bf2bf353b672dead1b14385526 radvd-0.9.ebuild 1485 RMD160 de15b8751ee5ca117706e1418c7fa9c2b627bea8 radvd-0.9.ebuild 1485 SHA256 2382ad99f38cbc827cf57982ac915e9771f9690bfdc106dd71cfad2920c5f764 radvd-0.9.ebuild 1485 +EBUILD radvd-1.0-r1.ebuild 1665 RMD160 4d7edee2f735a30cd670816f3a00244307b3f161 SHA1 87d7a2a1ba0da5facc40d8fd715d1598dc5e066f SHA256 5674529896ee5aa142bd1e27dbc896cfb262191e233cb6763b3eddeb5ed7c5cc +MD5 b141790bb60a8f5c528caafadbe97cb7 radvd-1.0-r1.ebuild 1665 +RMD160 4d7edee2f735a30cd670816f3a00244307b3f161 radvd-1.0-r1.ebuild 1665 +SHA256 5674529896ee5aa142bd1e27dbc896cfb262191e233cb6763b3eddeb5ed7c5cc radvd-1.0-r1.ebuild 1665 EBUILD radvd-1.0.ebuild 1662 RMD160 f5abbf05bb78738e13b9bcb1b0ff6e15f757e29c SHA1 9874e204e30d9b65ce8f0a287f585ecaa8a0964f SHA256 f4a24ffb523d7b4fed5f5784feba16eb9acb45d764485444cc1c55dad181dcd6 MD5 0fd6dde4fa79b6925995eef3d33b06a6 radvd-1.0.ebuild 1662 RMD160 f5abbf05bb78738e13b9bcb1b0ff6e15f757e29c radvd-1.0.ebuild 1662 SHA256 f4a24ffb523d7b4fed5f5784feba16eb9acb45d764485444cc1c55dad181dcd6 radvd-1.0.ebuild 1662 -MISC ChangeLog 3925 RMD160 27a8afca564a6f26ffa9d7bdc5259ae9a385b53e SHA1 39e372f1b95d18973008679167181f0691393e9e SHA256 b6756a70de4c255951911c075c3dc0b268cd4e2d11d72692909afb290060953c -MD5 f3760e6759dd1125b0d7c2e5503365bd ChangeLog 3925 -RMD160 27a8afca564a6f26ffa9d7bdc5259ae9a385b53e ChangeLog 3925 -SHA256 b6756a70de4c255951911c075c3dc0b268cd4e2d11d72692909afb290060953c ChangeLog 3925 +MISC ChangeLog 4119 RMD160 f5fd4da391aa28f4f606257e7230ec7c356bf27e SHA1 0bf33c2e5e054ce1d4e833b2f29c9211ae5a96bb SHA256 99249c831e86fb85b6a916a41d6488f1a6cf0164a6da584266ce9b5d0ede0a07 +MD5 1259aead63bc96c42b40565f2f913551 ChangeLog 4119 +RMD160 f5fd4da391aa28f4f606257e7230ec7c356bf27e ChangeLog 4119 +SHA256 99249c831e86fb85b6a916a41d6488f1a6cf0164a6da584266ce9b5d0ede0a07 ChangeLog 4119 MISC metadata.xml 311 RMD160 33fa67b9b29dbd5af68e04df56782bb6e6d0be3d SHA1 cf334dec5ae521d269d3f9f9cb6a47fc182694f6 SHA256 35b12a709a707a893841c32667b3053d585d6a47323e6533ab92615005e8a634 MD5 ec67e60a80389a5d8ebc59f1efb49137 metadata.xml 311 RMD160 33fa67b9b29dbd5af68e04df56782bb6e6d0be3d metadata.xml 311 SHA256 35b12a709a707a893841c32667b3053d585d6a47323e6533ab92615005e8a634 metadata.xml 311 -MD5 707572a18aaddef9ed366e5f950f4460 files/digest-radvd-0.9 61 -RMD160 7f093ecbbbfc965dce61ef8fec3c9c2e17c1f14e files/digest-radvd-0.9 61 -SHA256 8faeb70c2475349c4aeda04597e33e9a46907257b62de29fb5fe501af64eea76 files/digest-radvd-0.9 61 +MD5 55556c56519ec98f2fb2eebb933d362e files/digest-radvd-0.9 229 +RMD160 85d775c83ca15a995b4de69ef313c5af4a5c546e files/digest-radvd-0.9 229 +SHA256 e4be86b3058dba49224e4c251cb8add1877b96ad4cf7632995e0514fdd5ca4b0 files/digest-radvd-0.9 229 MD5 90666f7c665f3c97759d511d8a72b361 files/digest-radvd-0.9.1 235 RMD160 07db28756cf4ae511408afe6fb28cdc3c25dd2b1 files/digest-radvd-0.9.1 235 SHA256 461d508d0393f083711d32e8b04dc25509d9eacbfb56103a5aba0091bf592157 files/digest-radvd-0.9.1 235 MD5 010c5fe9076e50040b947c586909ad1e files/digest-radvd-1.0 229 RMD160 f352c156d4f867f1479b481979ae7782caa91681 files/digest-radvd-1.0 229 SHA256 e1c99b111a96c5abbded55b2b509edf9901478a96e0146e8255bb80f9be5cbcc files/digest-radvd-1.0 229 +MD5 010c5fe9076e50040b947c586909ad1e files/digest-radvd-1.0-r1 229 +RMD160 f352c156d4f867f1479b481979ae7782caa91681 files/digest-radvd-1.0-r1 229 +SHA256 e1c99b111a96c5abbded55b2b509edf9901478a96e0146e8255bb80f9be5cbcc files/digest-radvd-1.0-r1 229 diff --git a/net-misc/radvd/files/digest-radvd-0.9 b/net-misc/radvd/files/digest-radvd-0.9 index 8337ec3c177a..e3c70ca16ee9 100644 --- a/net-misc/radvd/files/digest-radvd-0.9 +++ b/net-misc/radvd/files/digest-radvd-0.9 @@ -1 +1,3 @@ MD5 128c1825975cd81168fe607e41587fbf radvd-0.9.tar.gz 104356 +RMD160 a1bc693c30d6d929dfe012a53dc22428a7022a64 radvd-0.9.tar.gz 104356 +SHA256 751fa0e5e536c1b57cc09e63440a0f01209dc4297a3c58e69058e741ef28ea15 radvd-0.9.tar.gz 104356 diff --git a/net-misc/radvd/files/digest-radvd-1.0-r1 b/net-misc/radvd/files/digest-radvd-1.0-r1 new file mode 100644 index 000000000000..4ea586cdd5d0 --- /dev/null +++ b/net-misc/radvd/files/digest-radvd-1.0-r1 @@ -0,0 +1,3 @@ +MD5 8bce4a21757cf069f5a69e2f9bee9e5b radvd-1.0.tar.gz 110170 +RMD160 a6d5aa3fe25b7751e5b0188add1d68633b20174e radvd-1.0.tar.gz 110170 +SHA256 fbc44fac8356426c115914eb5dce6fc84afea923ad6aba1670a3402c06bda7ab radvd-1.0.tar.gz 110170 diff --git a/net-misc/radvd/files/radvd.init b/net-misc/radvd/files/radvd.init index af2659926cb2..243c79872a26 100644 --- a/net-misc/radvd/files/radvd.init +++ b/net-misc/radvd/files/radvd.init @@ -1,18 +1,20 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/files/radvd.init,v 1.1 2006/07/19 13:02:36 uberlord Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/files/radvd.init,v 1.2 2007/02/09 16:57:13 uberlord Exp $ CONFIGFILE=/etc/radvd.conf PIDFILE=/var/run/radvd/radvd.pid SYSCTL_FORWARD=net.ipv6.conf.all.forwarding +opts="reload" + depend () { need net } checkconfig() { - if [ ! -f ${CONFIGFILE} ]; then + if [ ! -f "${CONFIGFILE}" ]; then eerror "Configuration file ${CONFIGFILE} not found" return 1 fi @@ -21,7 +23,7 @@ checkconfig() { start () { checkconfig || return 1 - if [[ ${FORWARD} != "no" ]]; then + if [ "${FORWARD}" != "no" ]; then ebegin "Enabling IPv6 forwarding" sysctl "${SYSCTL_FORWARD}=1" >/dev/null eend $? @@ -39,9 +41,24 @@ stop() { start-stop-daemon --stop --exec /usr/sbin/radvd --pidfile "${PIDFILE}" eend $? - if [[ ${FORWARD} != "no" ]]; then + if [ "${FORWARD}" != "no" ]; then ebegin "Disabling IPv6 forwarding" sysctl "${SYSCTL_FORWARD}=0" > /dev/null eend $? fi } + +reload() { + checkconfig || return 1 + + if [ "${FORWARD}" != "no" ]; then + ebegin "Enabling IPv6 forwarding" + sysctl "${SYSCTL_FORWARD}=1" >/dev/null + eend $? + fi + + ebegin "Reloading IPv6 Router Advertisement Daemon" + start-stop-daemon --stop --signal HUP --oknodo \ + --exec /usr/sbin/radvd --pidfile "${PIDFILE}" + eend $? +} diff --git a/net-misc/radvd/radvd-1.0-r1.ebuild b/net-misc/radvd/radvd-1.0-r1.ebuild new file mode 100644 index 000000000000..1c8d765e5bac --- /dev/null +++ b/net-misc/radvd/radvd-1.0-r1.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/radvd/radvd-1.0-r1.ebuild,v 1.1 2007/02/09 16:57:13 uberlord Exp $ + +inherit eutils + +DESCRIPTION="Linux IPv6 Router Advertisement Daemon" +HOMEPAGE="http://v6web.litech.org/radvd/" +SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ppc ~sparc ~x86" +IUSE="" + +DEPEND="sys-devel/bison + sys-devel/flex" +RDEPEND=">=sys-process/procps-3.2" + +pkg_setup() { + enewgroup radvd + enewuser radvd -1 -1 /dev/null radvd + + # force ownership of radvd user and group (bug #19647) + [[ -d ${ROOT}/var/run/radvd ]] && chown radvd:radvd "${ROOT}"/var/run/radvd +} + +src_compile() { + econf \ + --with-pidfile=/var/run/radvd/radvd.pid \ + || die "econf failed" + + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + + dodoc CHANGES README TODO radvd.conf.example + dohtml INTRO.html + + newinitd "${FILESDIR}/${PN}".init "${PN}" + newconfd "${FILESDIR}/${PN}".conf "${PN}" + + # location of radvd.pid needs to be writeable by the radvd user + keepdir /var/run/radvd + chown -R radvd:radvd "${D}"/var/run/radvd + fperms 755 /var/run/radvd +} + +pkg_postinst() { + einfo + einfo "To use ${PN} you must create the configuration file" + einfo "/etc/radvd.conf" + einfo + einfo "An example configuration file has been installed as" + einfo "/usr/share/doc/${PF}/radvd.conf.example.gz" + einfo + einfo "grsec users should allow a specific group to read /proc" + einfo "and add the radvd user to that group, otherwise radvd may" + einfo "segfault on startup" +} -- 2.26.2