added RUNAS option in init-script.
authorStefan Briesenick <sbriesen@gentoo.org>
Sat, 8 Oct 2005 16:38:58 +0000 (16:38 +0000)
committerStefan Briesenick <sbriesen@gentoo.org>
Sat, 8 Oct 2005 16:38:58 +0000 (16:38 +0000)
Package-Manager: portage-2.0.53_rc3

net-proxy/ziproxy/ChangeLog
net-proxy/ziproxy/Manifest
net-proxy/ziproxy/files/ziproxy.confd
net-proxy/ziproxy/files/ziproxy.initd
net-proxy/ziproxy/ziproxy-1.5.1.ebuild

index c61eb833830050d5bbe9a8b9affabe0c3d45d309..b565687ad13ff10e976bb139da2a8d16e696997a 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for net-proxy/ziproxy
 # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/ziproxy/ChangeLog,v 1.1 2005/10/07 00:03:55 sbriesen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/ziproxy/ChangeLog,v 1.2 2005/10/08 16:38:58 sbriesen Exp $
+
+  08 Oct 2005; Stefan Briesenick <sbriesen@gentoo.org> files/ziproxy.confd,
+  files/ziproxy.initd, ziproxy-1.5.1.ebuild:
+  added RUNAS option in init-script.
 
 *ziproxy-1.5.1 (07 Oct 2005)
 
index 7eb8d5f1d9aae13220602afb8d683e99ff4cb425..3c73213e861b9bf0cab350c41107a10727a36053 100644 (file)
@@ -1,6 +1,6 @@
-MD5 e7958d0ff5aed42d53e6a8e50881a50f ChangeLog 417
+MD5 3745dee1e7d55396f3f552fd293e356c ChangeLog 576
 MD5 d99134343b6a3f08d5a80d3c0c54e6c1 files/digest-ziproxy-1.5.1 66
-MD5 363428d06cea3db7d7eebabdfd4688fa files/ziproxy.confd 301
-MD5 072dbc2fc7b4fe372d4d5103bee02af3 files/ziproxy.initd 694
+MD5 007b66959e3f4d9ec2759e2fbfba370a files/ziproxy.confd 384
+MD5 71e0da62940b75aeeddf33c1b056d72c files/ziproxy.initd 762
 MD5 13eac033f7cb4d69bd27489ab828449a metadata.xml 513
-MD5 fc39d880b163ea68a5ca2811cb378140 ziproxy-1.5.1.ebuild 1618
+MD5 64627ef565dd039048382413c3b7a731 ziproxy-1.5.1.ebuild 1641
index e8b4f30f883c047cf91f580ce1b4b2667469e579..e110cc0d170961b46140681336f3b963dd13d98e 100644 (file)
@@ -9,3 +9,6 @@
 # if you want to set it.
 #
 #ONLYFROM="<IP.address or hostname>"
+
+# Change to this username/uid before starting the process.
+RUNAS="nobody:nogroup"
index 72abbe9178ebef478cb37f7d6c153acaa7901dca..8b7b2a4a959a7bf3d7faff86c14431af8df3e119 100644 (file)
@@ -1,18 +1,19 @@
 #!/sbin/runscript
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/ziproxy/files/ziproxy.initd,v 1.1 2005/10/07 00:03:55 sbriesen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/ziproxy/files/ziproxy.initd,v 1.2 2005/10/08 16:38:58 sbriesen Exp $
 
 depend() {
        need net
 }
 
 start() {
-       local OPT
+       local OPT="" EXTRA=""
        ebegin "Starting ziproxy"
        [ -n "${CONFIG}" ] && OPT="-c ${CONFIG}" || OPT="-c /etc/ziproxy.conf"
        [ -n "${ONLYFROM}" ] && OPT="${OPT} -f ${ONLYFROM}"
-       start-stop-daemon --quiet --start --background \
+       [ -n "${RUNAS}" ] && EXTRA="--chuid ${RUNAS}"
+       start-stop-daemon --quiet --start --background ${EXTRA} \
                --make-pidfile --pidfile /var/run/ziproxy.pid \
                --exec /usr/bin/netd -- ${OPT}
        eend $?
index 5e8ae2f1a380be0f028094aeec2bc49996e55f0d..128252ac4db4bc5297c3da5284bae1a69b2fdd16 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/ziproxy/ziproxy-1.5.1.ebuild,v 1.1 2005/10/07 00:03:55 sbriesen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/ziproxy/ziproxy-1.5.1.ebuild,v 1.2 2005/10/08 16:38:58 sbriesen Exp $
 
 inherit eutils
 
@@ -22,10 +22,12 @@ DEPEND="dev-libs/confuse
 src_unpack() {
        unpack ${A}
        cd "${S}"
+
        # fix sample xinetd config filee
        sed -i -e "s:/home/juro/bin/:/usr/bin/:g" \
                -e "s:/home/juro/ziproxy/:/etc/:g" \
                -e "s:\(disable.*=\).*:\1 yes:g" etc/xinetd.d/ziproxy
+
        # fix sample config file
        sed -i -e "s:/usr/local/bin/:/usr/bin/:g" \
                -e "s:/var/ziproxy/:/var/lib/ziproxy/:g" \
@@ -33,7 +35,7 @@ src_unpack() {
 }
 
 src_compile() {
-       local myconf="--enable-shared-confuse --with-cfgfile=/etc/ziproxy.conf"
+       local myconf="--enable-shared-confuse --with-cfgfile=/etc/ziproxy.conf" # --enable-testprogs
        use jpeg2k && myconf="${myconf} --with-jasper"  # use_with doesn't work
        econf ${myconf} || die "econf failed"
        emake || die "emake failed"