dirinst comparing "X$action" with "Xdirinst" instead of $action with "dirinst"

Henning Sprang henning_sprang at gmx.de
Sun Oct 1 13:31:08 CEST 2006


Hi,
In some places I see this line in the sources:

if [ X$action = Xdirinst ]; then

To do something when doing a dirinstall.

I do not exactly get why it is necessary to add the "X" in front of
the two strings to compare. It probably doesn't do any bad, cause the
code looke like working the same with or without the "X", but if it
doesn't do any good, also, why must it be like that anyway?

Henning



More information about the linux-fai-devel mailing list