This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
cmd:isset [2011/04/08 18:46] mcb30 |
cmd:isset [2011/04/08 18:49] mcb30 |
||
---|---|---|---|
Line 23: | Line 23: | ||
===== Description ===== | ===== Description ===== | ||
- | Test existence of the specified value, which will normally be a configuration [[:settings|setting]]. Existence is indicated via the command status; the conditional operators ''&&'' and ''||'' can be used to decide what action to take based upon the existence or non-existence of the setting. | + | Test existence of the specified value, which will normally be a configuration [[:settings|setting]]. Existence is indicated via the command status; the conditional operators ''&&'' and ''||'' can be used to decide what action to take as a result. |
===== Command status ===== | ===== Command status ===== | ||
- | ^ Success | The configuration setting exists | | + | ^ Success | The value exists | |
- | ^ Failure | The configuration setting does not exist | | + | ^ Failure | The value does not exist | |
===== See also ===== | ===== See also ===== | ||
Line 40: | Line 40: | ||
===== Notes ===== | ===== Notes ===== | ||
- | |||
- | The ''isset'' command relies upon the [[:settings]] expansion performed by all iPXE commands. The implementation of the ''isset'' command simply tests to see if it has a non-empty argument. | ||
You should always consider what will happen if the setting does not exist. For example: | You should always consider what will happen if the setting does not exist. For example: |