cobbler/cobbler — pull request #101 by nacc (2012-03-13 00:11:28+00:00)
Title: Fix issue with cobbler system reboot

Commit 659a2e5b tried to fix a stack trace with cobbler system reboot
without a --name option, but instead completely broke system reboot.
Rather than actually reboot the system, issuing `cobbler system reboot
--name=...' would result in the corresponding system being saved in the
backend.

Fix this by first obtaining all valid actions up-front in a python
2.4-compatible way. Then, re-order the action conditionals to check the
three that don't require a name parameter first, followed by any valid
action. If it's a valid name-requiring action without a name option,
quit with a warning. Otherwise, fall down into the appropriate handler
block, but actually do 'reboot' in the right place (not as a save
operation).

Signed-off-by: Nishanth Aravamudan