Fix AMT fence agent
The 'amttool' command takes the AMT_PASSWORD environment variable.
When amttool prompts for a confirmation the variable is read only
by the left side of the pipe command:
- Broken:
$ AMT_PASSWORD='foobar' echo 'y' | /usr/bin/amttool nuc2 powerdown
401 Unauthorized at /usr/bin/amttool line 129.
- Working:
$ AMT_PASSWORD='foobar' sh -c "(echo 'y' | /usr/bin/amttool nuc2 # powerdown)"
execute: powerdown
result: pt_status: success
A longer-term fix is to remove the amttool dependency and implement the
calls directly via the python-openwsman package