RHAT bug? /etc/init.d/functions:daemon()

Michael ODonnell michael.odonnell at comcast.net
Tue Jan 31 16:05:01 EST 2006


A couple of questions; first, does anybody else have a
recent RHAT EL4 system where the daemon() function defined
in /etc/init.d/functions starts out with this line:

  while [ "$1" != "${1##[-+]}" ]; do

...and second, can anybody explain the alleged logic?

I claim it can NEVER evaluate true because $1 is always the
name of the daemon you want launched so (unless that name
begins with a plus or a minus) the LH expression will always
be that same as the RH one and the test will always fail.

I wrote a daemon that I intend to execute at low priority
and hoped to use that daemon function to launch it, but it's
never evaluating my "--nice" parameters because it's never
entering that dang loop...  :-/
 









For the terminally curious, here's the entire function:

begin 666 daemonFunction.sh.gz
M'XL(`$30WT,``[55WW/3.!!^SU_QG>-I:3A7"6^T%YC"!28SH6%HX25T.JHM
M)YHZ4FK)@1#RO[.2W<1-?3=PS/DACG>UO[[]=M7&&=)"Q59J!:MA+,\M.!:Y
MGN9\?MQ*N)AK]>0(ZQ:JIXU+82S,2EG^]7 at KSG3,,TRUO>%&])'J/!;]/6VI
M*HS(^U"2]+B9]K&0R>Z@$V=B*;)^=RO[,I.9P`1!V`OP1Y_>ZUZ[/8F>7FT"
M7)TBT=NC0$PQ$/8 at 54T('!X>N9>(9QIA$'9/\-'PJ3A!62$F3UFTC7V%=87`
M)GC at I7IR88M<H7=Z^D`;1?%,Q+='32:^]/!9D^H>LV`E3&,X,Y.I1:-M<P;]
MEYU_28+`NS^W^>_Y_%0VKM6-F7 at .-,/Q*]5Z-_]0;!G"%^O_-M;Z\Z5X0C<&
M*JD>^-=OX>48/>E&SZ^:"_(3$[A?1(HH_ENQ.GX<_L]Y$(;'V\]$*]&JK9`+
MOA2>CHK/Q6Z)3!!]H_&N&$C#C8.#'6O;';9YX$0(R!32'AKP+!<\62$OE))J
M>HR1UK?H:)6M.N`6=B;<HD%*JV07CZPI9`JVY#DC4Q:N7;3-L3M*FX6LU*."
MRUV6244>'RE=%J7NKT:OCPR(-EC0MD+HK?:VV<.G at F>]8,SSA-'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