Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.3.3, 5.4-dev
-
None
Description
/etc/init.d/solr tries to redirect stderr output to /dev/null in some places, but does it the wrong way, using 2&>1 instead of 2>&1. This leads to:
- the file '1' begin created in the current directory
- /etc/init.d/solr restart not working because killproc does not work when given another argument (2).
diff -u
@@ -60,26 +54,26 @@ } d_stop() { - killproc -p /var/run/solr.pid $NAME >> /dev/null 2&>1 + killproc -p /var/run/solr.pid $NAME >> /dev/null 2>&1 RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME return $RETVAL } d_restart() { - d_stop >> /dev/null 2&>1 + d_stop >> /dev/null 2>&1 sleep 1 - d_start >> /dev/null 2&>1 + d_start >> /dev/null 2>&1 } d_reload() { - killproc -p /var/run/solr.pid $NAME -HUP 2&>1 + killproc -p /var/run/solr.pid $NAME -HUP 2>&1 RETVAL=$? return $RETVAL } d_status() { - status -p /var/run/solr.pid $NAME >> /dev/null 2&>1 + status -p /var/run/solr.pid $NAME >> /dev/null 2>&1 return $? }
Also, the & after the daemon command in d_start, wich makes it start in the background, has the effect that $? is always zero.
No file attached - I will do this in the next report, which is about a worse problem.