On Wednesday 18 May 2005 17:32, Andrzej Krzysztofowicz wrote: > glen wrote: > > Author: glen Date: Wed May 18 14:19:49 2005 GMT > > Module: SOURCES Tag: HEAD > > ---- Log message: > > - use $RETVAL, as echo does not propagete error code > > At least partially to be reverted. > RETVAL is returned by script. > LSB says "stop" must always return 0. As it must not fail. hmm, didn't know... reverted
> > ================================================================ > > Index: SOURCES/apache.init > > diff -u SOURCES/apache.init:1.37 SOURCES/apache.init:1.38 > > --- SOURCES/apache.init:1.37 Thu Apr 28 16:28:23 2005 > > +++ SOURCES/apache.init Wed May 18 16:19:44 2005 > > @@ -61,9 +61,9 @@ > > if [ -f /var/lock/subsys/httpd ]; then > > msg_stopping httpd.${HTTPD_MPM} > > daemon --waitforname httpd.${HTTPD_MPM} --waitfortime 60 > > httpd.${HTTPD_MPM} $CFG -k stop - RET=$? > > + RETVAL=$? > > # Delete pidfile only when apache was called successfully > > - if [ $RET -eq 0 ]; then > > + if [ $RETVAL -eq 0 ]; then > > rm -f /var/lock/subsys/httpd /var/run/httpd.pid > > /var/run/httpd.loc* > > >/dev/null 2>&1 fi > > else > > @@ -83,13 +83,13 @@ > > if [ -f /var/lock/subsys/httpd ]; then > > msg_reloading httpd.${HTTPD_MPM} > > httpd.${HTTPD_MPM} $CFG -t > /dev/null 2>&1 > > - if [ $? -eq 0 ]; then > > + RETVAL=$? > > + if [ $RETVAL -eq 0 ]; then > > daemon httpd.${HTTPD_MPM} $CFG -k graceful > > daemon is assumed never to fail ? > Even in future ? don't understand, you mean error code from daemon isn't checked? or something wrong with the change? -- glen -- glen _______________________________________________ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en