Last active
April 4, 2021 11:01
-
-
Save sierra-tango-echo/e3c2cfbea861c35e5f1cdf6582df24e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CONTROLLER=http://10.10.0.1 | |
| wget "${CONTROLLER}/deployment/files/dtk.tgz" -O /tmp/dtk.tgz | |
| tar -zxvf /tmp/dtk.tgz -C /tmp/. | |
| yum -y localinstall /tmp/srvadmin-idracadm7-9.3.0-3425.14676.el7.x86_64.rpm /tmp/srvadmin-hapi-9.3.0-3425.14676.el7.x86_64.rpm /tmp/srvadmin-omilcore-9.3.0-3425.14676.el7.x86_64.rpm /tmp/srvadmin-argtable2-9.3.0-3425.14676.el7.x86_64.rpm | |
| curl ${CONTROLLER}/deployment/files/dell_config.xml > /tmp/config.xml | |
| if ! ( grep -q 'SystemConfiguration Model="PowerEdge' /tmp/config.xml ); then | |
| #not a valid config file - fetch and edit | |
| /opt/dell/srvadmin/sbin/racadm get --clone -t xml -f /tmp/config.xml | |
| sed -e 's|<Attribute Name="Users.2#UserName">.*</Attribute>|<Attribute Name="Users.2#UserName">admin</Attribute>|g' -i /tmp/config.xml | |
| sed -e 's|<Attribute Name="Users.2#Password">.*</Attribute>|<Attribute Name="Users.2#Password">admin</Attribute>|g' -i /tmp/config.xml | |
| echo "Bios configuration saved to /tmp/config.xml" | |
| else | |
| /opt/dell/srvadmin/sbin/racadm set -t xml -f /tmp/config.xml -s Off | |
| fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment