Merge lp:~andreserl/maas/fix_ipmi_command_execution into lp:maas/trunk
| Status: | Merged |
|---|---|
| Approved by: | Andres Rodriguez on 2012-10-06 |
| Approved revision: | 1196 |
| Merged at revision: | 1199 |
| Proposed branch: | lp:~andreserl/maas/fix_ipmi_command_execution |
| Merge into: | lp:maas/trunk |
| Diff against target: |
34 lines (+8/-2) 1 file modified
src/provisioningserver/power/templates/ipmi.template (+8/-2) |
| To merge this branch: | bzr merge lp:~andreserl/maas/fix_ipmi_command_execution |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Gavin Panella (community) | 2012-10-06 | Approve on 2012-10-06 | |
| Andres Rodriguez | Pending | ||
|
Review via email:
|
|||
This proposal supersedes a proposal from 2012-10-06.
Commit Message
Minor improvements to IPMI template
| MAAS Lander (maas-lander) wrote : | # |
No commit message specified.
| Gavin Panella (allenap) wrote : | # |
I think there are a couple of errors in here that need fixing, in a
follow-up branch now this has merged.
[1]
+formulate_
+ case $1 in
+ 'on') echo '--cycle --on-if-off' ;;
+ 'off') echo '--off' ;;
+ *)
+ echo "Got unknown power state from ipmipower: '$2'" >&2
s/$2/$1/
[2]
+ ${ipmipower} -h ${power_address} -u ${power_user} -p ${power_pass} $*
"$@" is almost always a better choice than $*; the latter will cause
the shell to break arguments that contain white-space into multiple
arguments.
[3]
formulate_
case $2 in
I know you didn't change this, but what does $2 refer to? Please add
comments describing the arguments to this function, and to
formulate_
| MAAS Lander (maas-lander) wrote : | # |
No commit message specified.


This branch fixes the ipmi command executing as in a particular case it produced an error, due to recent changes I introduced. I'm approving this branch myself as there's no one to review and this gets the issue fixed. It has been tested.