diff options
author | Thilo Bangert <bangert@gentoo.org> | 2009-04-12 18:00:42 +0000 |
---|---|---|
committer | Thilo Bangert <bangert@gentoo.org> | 2009-04-12 18:00:42 +0000 |
commit | a6b4b6a0556eba7837a45ae32c3d42a51770eded (patch) | |
tree | da4798bc7d6d0ccc7f65d40546554ca1c442f178 /www-servers | |
parent | stable ppc64, bug 265702 (diff) | |
download | gentoo-2-a6b4b6a0556eba7837a45ae32c3d42a51770eded.tar.gz gentoo-2-a6b4b6a0556eba7837a45ae32c3d42a51770eded.tar.bz2 gentoo-2-a6b4b6a0556eba7837a45ae32c3d42a51770eded.zip |
warn if FCGI_PROGRAM is not executable - fix lineendings (bug #265454) - thanks Elias Probbst
(Portage version: 2.2_rc26/cvs/Linux i686)
Diffstat (limited to 'www-servers')
-rw-r--r-- | www-servers/spawn-fcgi/ChangeLog | 6 | ||||
-rw-r--r-- | www-servers/spawn-fcgi/files/spawn-fcgi.initd | 23 |
2 files changed, 20 insertions, 9 deletions
diff --git a/www-servers/spawn-fcgi/ChangeLog b/www-servers/spawn-fcgi/ChangeLog index a90fb99a28e5..2c2e1338530f 100644 --- a/www-servers/spawn-fcgi/ChangeLog +++ b/www-servers/spawn-fcgi/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for www-servers/spawn-fcgi # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/spawn-fcgi/ChangeLog,v 1.9 2009/04/12 12:44:37 klausman Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/spawn-fcgi/ChangeLog,v 1.10 2009/04/12 18:00:41 bangert Exp $ + + 12 Apr 2009; Thilo Bangert <bangert@gentoo.org> files/spawn-fcgi.initd: + add extra warning if FCGI_PROGRAM is not executable - fix lineendings + (bug #265454) 12 Apr 2009; Tobias Klausmann <klausman@gentoo.org> spawn-fcgi-1.6.1-r1.ebuild: diff --git a/www-servers/spawn-fcgi/files/spawn-fcgi.initd b/www-servers/spawn-fcgi/files/spawn-fcgi.initd index 404465a3ba45..b904485dec6d 100644 --- a/www-servers/spawn-fcgi/files/spawn-fcgi.initd +++ b/www-servers/spawn-fcgi/files/spawn-fcgi.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/spawn-fcgi/files/spawn-fcgi.initd,v 1.7 2009/04/10 09:30:25 bangert Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/spawn-fcgi/files/spawn-fcgi.initd,v 1.8 2009/04/12 18:00:42 bangert Exp $ PROGNAME=${SVCNAME#*.} SPAWNFCGI=/usr/bin/spawn-fcgi @@ -13,6 +13,9 @@ depend() { } start() { + local X E OPTIONS i RETVAL FCGI_PROGRAM_EXEC + FCGI_PROGRAM_EXEC=(${FCGI_PROGRAM}) + if [ "${SVCNAME}" = "spawn-fcgi" ]; then eerror "You are not supposed to run this script directly. Create a symlink" eerror "for the FastCGI application you want to run as well as a copy of the" @@ -33,13 +36,18 @@ start() { fi if [ -z "${FCGI_PROGRAM}" ]; then - eerror "You need to specify which FCGI program you want" - eerror "spawn-fcgi to start." - eerror "Look at /etc/conf.d/spawn-fcgi.${PROGNAME}" + eerror "You need to specify which \$FCGI_PROGRAM" + eerror "you want to start." + eerror "Please adjust /etc/conf.d/spawn-fcgi.${PROGNAME}" return 1 fi - local X E OPTIONS i RETVAL FCGI_PROGRAM_NAME + if [ ! -x "${FCGI_PROGRAM_EXEC}" ]; then + eerror "The file specified as \$FCGI_PROGRAM" + eerror "does not exist or is not executable." + eerror "Please adjust /etc/conf.d/spawn-fcgi.${PROGNAME}" + return 1 + fi if [ -z "${FCGI_ADDRESS}" ]; then FCGI_ADDRESS=127.0.0.1 @@ -69,7 +77,6 @@ start() { done ebegin "Starting FastCGI application ${PROGNAME}" - FCGI_PROGRAM_NAME=(${FCGI_PROGRAM}) X=0 while [ $X -lt ${FCGI_CHILDREN} ]; do X=$(($X+1)) @@ -78,8 +85,8 @@ start() { [ -n "${FCGI_SOCKET}" ] && SOCKET_OPTION="-s ${FCGI_SOCKET}-${X}" [ -n "${FCGI_PORT}" ] && INET_OPTION="-a ${FCGI_ADDRESS} -p $((${FCGI_PORT} + ${X} - 1))" - env ${E} start-stop-daemon --start --pidfile ${P} --exec ${SPAWNFCGI} \ - --name ${FCGI_PROGRAM_NAME} -- ${SOCKET_OPTION} ${INET_OPTION} \ + env ${E} start-stop-daemon --start --pidfile ${P} --exec ${SPAWNFCGI} \ + --name ${FCGI_PROGRAM_EXEC} -- ${SOCKET_OPTION} ${INET_OPTION} \ -P ${P} ${OPTIONS} -- ${FCGI_PROGRAM} RETVAL=$? |