Skip to content

Instantly share code, notes, and snippets.

@ThinGuy
Created February 1, 2019 19:18
Show Gist options
  • Save ThinGuy/471097fc38d0f7b319806ceb3c4f3153 to your computer and use it in GitHub Desktop.
Save ThinGuy/471097fc38d0f7b319806ceb3c4f3153 to your computer and use it in GitHub Desktop.
Commission Dell 740xd
#!/bin/bash -x
# --- Start MAAS 1.0 script metadata ---
# name: 00-dell-firmware-00-all
# type: commissioning
# title: Firmware Update for PowerEdge R740xd
# description: Dell PowerEdge R740xd Firmware Updates
# script_type: commissioning 
# tags: commissioning update_firmware
# for_hardware: mainboard_product:00WGD1
# may_reboot: True
# --- End MAAS 1.0 script metadata ---
## Foundation Cloud Infrastructure Commissioning Script for Dell PowerEdge 740xd
##
## This script updates the firmware listed in the URLLIST array
## The last URLLIST entry will run with a reboot
##
## Copyright (C) 2019 Canonical Ltd.
##
## Authors: Craig Bender <craig.bender@canonical.com>
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, version 3 of the License.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
# Currently this script does not work during commissioning due to limited memory
apt install build-essential dkms libssl-dev libssl1.0.0 libssl1.1 -yq
# Self extracting files
declare -a URLLIST=(
https://downloads.dell.com/FOLDER05328929M/1/BIOS_CVHH4_LN_1.6.12.BIN
https://downloads.dell.com/FOLDER05352961M/1/iDRAC-with-Lifecycle-Controller_Firmware_FDMV1_LN_3.21.26.22_A00.BIN
https://downloads.dell.com/FOLDER05313029M/1/CPLD_Firmware_PC0N3_LN_1.0.6_A00.BIN
)
for URL in ${URLLIST[@]};do
wget -q $URL
chmod +x ${URL##*/}
./${URL##*/} -qc
if [[ $? -eq 0 ]];then
[[ ${URL} = ${URLLIST[-1]} ]] && ./${URL##*/} -qnr || ./${URL##*/} -qn
fi
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment