~matsubara/maas/1.2-test-merge

« back to all changes in this revision

Viewing changes to src/provisioningserver/power/templates/ipmi.template

  • Committer: Tarmac
  • Author(s): Andres Rodriguez
  • Date: 2013-01-15 00:39:59 UTC
  • mfrom: (1345.2.2 maas-12.10)
  • Revision ID: tarmac-20130115003959-b80lmbxvlsf4ccjf
[r=julian-edwards][bug=1086162][author=andreserl] Thanks to Raphael for this patch. I tested it and fixed a minor issue. Otherwise seems to be working as expected.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
power_address={{power_address}}
9
9
power_user={{power_user}}
10
10
power_pass={{power_pass}}
 
11
power_driver={{power_driver}}
11
12
ipmipower={{ipmipower}}
12
13
ipmi_chassis_config={{ipmi_chassis_config}}
13
14
config={{config_dir}}/{{ipmi_config}}
41
42
# Issue command to ipmipower, for the given system.
42
43
issue_ipmi_command() {
43
44
    # See https://launchpad.net/bugs/1053391 for details of this workaround
44
 
    echo workaround |\
45
 
    ${ipmi_chassis_config} -h ${power_address} -u ${power_user} -p ${power_pass} --commit --filename ${config}
46
 
    echo workaround |\
47
 
    ${ipmipower} -h ${power_address} -u ${power_user} -p ${power_pass} "$@"
 
45
    driver_option=""
 
46
    if [ -n "$power_driver" ]
 
47
        then
 
48
          driver_option="--driver-type=$power_driver"
 
49
    fi
 
50
 
 
51
    echo workaround |\
 
52
    ${ipmi_chassis_config} ${driver_option} -h ${power_address} -u ${power_user} -p ${power_pass} --commit --filename ${config}
 
53
    echo workaround |\
 
54
    ${ipmipower} ${driver_option} -h ${power_address} -u ${power_user} -p ${power_pass} "$@"
48
55
}
49
56
 
50
57