From 04ef4114cf22d027db040f1d84ecd2f0b43b0a0e Mon Sep 17 00:00:00 2001 From: Peter Volkov Date: Sun, 28 Jan 2007 15:02:47 +0000 Subject: [PATCH] Fixed init script to handle multiple HONEYD_NETS. Thank Jeremy Hanmer for report (bug #161842). Package-Manager: portage-2.1.1-r2 --- net-analyzer/honeyd/ChangeLog | 8 +++++-- net-analyzer/honeyd/Manifest | 16 +++++++------- net-analyzer/honeyd/files/honeyd.initd | 29 +++++++++++++++----------- 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/net-analyzer/honeyd/ChangeLog b/net-analyzer/honeyd/ChangeLog index 35fd2a66613c..67ce8606e78c 100644 --- a/net-analyzer/honeyd/ChangeLog +++ b/net-analyzer/honeyd/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-analyzer/honeyd -# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/honeyd/ChangeLog,v 1.29 2006/09/07 06:54:57 pva Exp $ +# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/honeyd/ChangeLog,v 1.30 2007/01/28 15:02:46 pva Exp $ + + 28 Jan 2007; files/honeyd.initd: + Fixed init script to handle multiple HONEYD_NETS. Thank Jeremy Hanmer + for report (bug #161842). 07 Sep 2006; Peter Volkov -files/honeyd-1.0-gcc4.diff, -honeyd-1.0-r1.ebuild: diff --git a/net-analyzer/honeyd/Manifest b/net-analyzer/honeyd/Manifest index 9fdbf0d0b7f1..e7689eda61cf 100644 --- a/net-analyzer/honeyd/Manifest +++ b/net-analyzer/honeyd/Manifest @@ -2,20 +2,20 @@ AUX honeyd.confd 429 RMD160 6d419ce741687e60a61ecd265455b25d3eaba56a SHA1 b79f1d MD5 05aa030ef5d390514cee9da3fa910690 files/honeyd.confd 429 RMD160 6d419ce741687e60a61ecd265455b25d3eaba56a files/honeyd.confd 429 SHA256 e7b75f49f37fd4f2d8ad86d81b1924bb179ad220099549f8ecf9d395d4caa890 files/honeyd.confd 429 -AUX honeyd.initd 1464 RMD160 cf3652d2ad12b08cb928f7928a6daee7e2139dde SHA1 8b6e757592bf074a34f5d88a7afca4e4b3585a8c SHA256 a6d3e9ba567416cf2ac799d1a09a4e9a0f21b5d68d822800b45a1310007dff44 -MD5 136db19ad000802545ff0250f4ce7ee4 files/honeyd.initd 1464 -RMD160 cf3652d2ad12b08cb928f7928a6daee7e2139dde files/honeyd.initd 1464 -SHA256 a6d3e9ba567416cf2ac799d1a09a4e9a0f21b5d68d822800b45a1310007dff44 files/honeyd.initd 1464 +AUX honeyd.initd 1526 RMD160 c29612d39d26b86e2648158dbe16a2f79ff4253e SHA1 8a7eb9fcc3be3a5a9ff6ebaf9a1d88811527543a SHA256 f64a0b99452688fa3fdc8a4ad6fe4af3d9654fd2620d176701b0980b73f081b5 +MD5 d3a754e53c439e242943c15269d536b7 files/honeyd.initd 1526 +RMD160 c29612d39d26b86e2648158dbe16a2f79ff4253e files/honeyd.initd 1526 +SHA256 f64a0b99452688fa3fdc8a4ad6fe4af3d9654fd2620d176701b0980b73f081b5 files/honeyd.initd 1526 DIST honeyd-0.7a-beta2.tgz 2027537 RMD160 a1229402ede63753b1256b0ae6dc1db12c0f0993 SHA1 563d0bf89215e53718267fc5c7aca3f0a054651a SHA256 0977ab78d3efb6d8f5d6d8250d362337f7fc0fbb3c5e3632e6c3d2db38fe6fe9 DIST honeyd-1.5b.tar.gz 881787 RMD160 40ebe7d3a2915b5145c5a2eef04b9d1de18fbb09 SHA1 a6cef01ddb0b649442ac60e2a08b226b1634e3f9 SHA256 2f00ebdac4c47b157b076e255bd757a6ef7b7f043cc499493d1c0f9e458527a5 EBUILD honeyd-1.5b.ebuild 1932 RMD160 0d700bc53b603960a66cefe8f54b30264165dc32 SHA1 584d17e880b19ce619250054a464986d03da2795 SHA256 3c6b462b90404a68252b0e0905f97c67325d28fbd7efc43d07a9eacddec899f5 MD5 03f8f8e50120064ab89d8b4ddf7c294b honeyd-1.5b.ebuild 1932 RMD160 0d700bc53b603960a66cefe8f54b30264165dc32 honeyd-1.5b.ebuild 1932 SHA256 3c6b462b90404a68252b0e0905f97c67325d28fbd7efc43d07a9eacddec899f5 honeyd-1.5b.ebuild 1932 -MISC ChangeLog 4306 RMD160 f65837a4c7d48ab81ad9ded20132b9b96c090b62 SHA1 0397f1dd67e8cc20ab3e84ef5dd0f5c6cf0961b5 SHA256 12c8826958988c82e3090356ce1f66f97ffc74325e81786fff933d2e6740ceb6 -MD5 19e0862d62b039f002543a45fbafaf1e ChangeLog 4306 -RMD160 f65837a4c7d48ab81ad9ded20132b9b96c090b62 ChangeLog 4306 -SHA256 12c8826958988c82e3090356ce1f66f97ffc74325e81786fff933d2e6740ceb6 ChangeLog 4306 +MISC ChangeLog 4481 RMD160 e4a9a3276fdb344903429f7564461c6e535de8df SHA1 4c632310d465bb51352a7a2c6161915cdfb4d11d SHA256 58ed20359c4c9e663ae3784a60ff644ad63ea6a3cc471d000737265950a0f272 +MD5 f678c4b8702399fdc44c41e2bb76d2c3 ChangeLog 4481 +RMD160 e4a9a3276fdb344903429f7564461c6e535de8df ChangeLog 4481 +SHA256 58ed20359c4c9e663ae3784a60ff644ad63ea6a3cc471d000737265950a0f272 ChangeLog 4481 MISC metadata.xml 730 RMD160 591e1fb359c34c84b3f5189bd5cbcddb9c207988 SHA1 b7e97e39702baabeb53d941c5a3d7c33df11778d SHA256 fa5d67ec739119ef24cfb9b33f05c69982087e76bc0724e9704f19edb8dbad26 MD5 849565f19efbec0f53124729e4e74591 metadata.xml 730 RMD160 591e1fb359c34c84b3f5189bd5cbcddb9c207988 metadata.xml 730 diff --git a/net-analyzer/honeyd/files/honeyd.initd b/net-analyzer/honeyd/files/honeyd.initd index 97d21c43c957..0a6595b05817 100644 --- a/net-analyzer/honeyd/files/honeyd.initd +++ b/net-analyzer/honeyd/files/honeyd.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/honeyd/files/honeyd.initd,v 1.2 2005/06/30 14:45:51 ka0ttic Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/honeyd/files/honeyd.initd,v 1.3 2007/01/28 15:02:47 pva Exp $ depend() { need net @@ -10,7 +10,7 @@ depend() { start() { local options - ebegin "Starting honeyd" + ebegin "Starting honeyd" if [[ -z "${HONEYD_NET}" ]] ; then eerror "HONEYD_NET variable must be set in /etc/conf.d/honeyd" @@ -19,9 +19,11 @@ start() { fi # add route - if ! netstat -arn | egrep "^${HONEYD_NET}[[:space:]]*127.0.0.1" ; then - route add -net ${HONEYD_NET} gw 127.0.0.1 - fi + for HNET in ${HONEYD_NET} ; do + if ! netstat -arn | egrep "^${HNET}[[:space:]]*127.0.0.1" ; then + route add -net ${HNET} gw 127.0.0.1 + fi + done if [[ -n "${HONEYD_LOG}" ]] ; then options="${options} -l ${HONEYD_LOG}" @@ -42,15 +44,18 @@ start() { options="${options} -i ${HONEYD_IF:-lo} ${HONEYD_OPTS}" - start-stop-daemon --start --quiet --exec /usr/sbin/honeyd \ - -- ${options} ${HONEYD_NET} >/dev/null 2>&1 - eend $? + start-stop-daemon --start --quiet --exec /usr/sbin/honeyd \ + -- ${options} ${HONEYD_NET} >/dev/null 2>&1 + eend $? } stop() { - ebegin "Stopping honeyd" - start-stop-daemon --stop --quiet --retry 5 --exec /usr/sbin/honeyd - route del -net ${HONEYD_NET} gw 127.0.0.1 - eend $? + ebegin "Stopping honeyd" + start-stop-daemon --stop --quiet --retry 5 --exec /usr/sbin/honeyd + retval=$? + for HNET in ${HONEYD_NET} ; do + route del -net ${HNET} gw 127.0.0.1 + done + eend ${retval} } -- 2.26.2