From e493991bc5164afe40e5926145270491722a47c7 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 3 Feb 2010 21:47:22 +0000 Subject: [PATCH] [packages] sslh: update to v1.7a (#6631) SVN-Revision: 19506 --- net/sslh/Makefile | 8 ++++---- net/sslh/files/sslh.init | 17 ++++++++--------- net/sslh/patches/002-fork_fix.patch | 10 ---------- 3 files changed, 12 insertions(+), 23 deletions(-) delete mode 100644 net/sslh/patches/002-fork_fix.patch diff --git a/net/sslh/Makefile b/net/sslh/Makefile index 15d26bfa9b..aed28999b7 100644 --- a/net/sslh/Makefile +++ b/net/sslh/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009 OpenWrt.org +# Copyright (C) 2009-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=sslh -PKG_VERSION:=1.6i -PKG_RELEASE:=3 +PKG_VERSION:=1.7a +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://rutschle.net/tech/ -PKG_MD5SUM:=b2e0a207df885d7be57713449edae815 +PKG_MD5SUM:=ee124654412198a5e11fe28acf10634d include $(INCLUDE_DIR)/package.mk diff --git a/net/sslh/files/sslh.init b/net/sslh/files/sslh.init index b4b9e5afcc..98b7d84ebd 100644 --- a/net/sslh/files/sslh.init +++ b/net/sslh/files/sslh.init @@ -1,5 +1,5 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2009 OpenWrt.org +# Copyright (C) 2009-2010 OpenWrt.org NAME=sslh PROG=/usr/sbin/sslh @@ -60,7 +60,7 @@ stop() # killing all server processes for pidfile in `ls /var/run/${NAME}.*.pid` do - start-stop-daemon -K -s KILL -p "${pidfile}" -n "${NAME}" >/dev/null + start-stop-daemon -q -K -s KILL -p "${pidfile}" -n "${NAME}" [ $? -ne 0 ] && rc=1 rm -f "${pidfile}" done @@ -103,12 +103,10 @@ killclients() server=`echo ${connection} | cut -d ' ' -f 7 | cut -d '/' -f 1` # check if client connection - ps | grep -e "^[ ]*${server} " | grep -e "${PROG}" >/dev/null - if [ $? -eq 0 ] - then + grep -F -q -e "${PROG}" "/proc/${server}/cmdline" && { append ignore "${server}" break - fi + } done # get all server pids that should be ignored @@ -121,9 +119,10 @@ killclients() local skip for pid in `pidof "${NAME}"` do - # check if correct program - ps | grep -e "^[ ]*${pid} " | grep -e "${PROG}" >/dev/null - [ $? -ne 0 ] && continue + # check if correct program, otherwise process next pid + grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || { + continue + } # check if pid should be ignored (servers, ourself) skip=0 diff --git a/net/sslh/patches/002-fork_fix.patch b/net/sslh/patches/002-fork_fix.patch deleted file mode 100644 index f404a798e8..0000000000 --- a/net/sslh/patches/002-fork_fix.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/sslh.c -+++ b/sslh.c -@@ -469,6 +469,7 @@ - - if (!fork()) - { -+ close(listen_socket); - start_shoveler(in_socket); - exit(0); - } -- 2.30.2