Skip to content

Instantly share code, notes, and snippets.

@Guitsou
Last active December 17, 2015 16:49
Show Gist options
  • Save Guitsou/5642033 to your computer and use it in GitHub Desktop.
Save Guitsou/5642033 to your computer and use it in GitHub Desktop.
Dell OpenManage
#!/bin/bash
PASSWORD="toto"
if ! grep -i qemu /proc/cpuinfo > /dev/null; then ## VM ou phys ?
if [ -f /opt/dell/srvadmin/bin/omreport ]; then ## Tools DELL ok ?
ID=$(omreport chassis remoteaccess config=user | grep -B 3 root | awk '/ID/ {print $4}')
echo "ID root : $ID"
echo "Changement de mot de passe..."
omconfig chassis remoteaccess config=user id=$ID newpw=$PASSWORD confirmnewpw=$PASSWORD
if [ $? -ne 0 ]; then echo "Changement de mot de passe en erreur !"; exit 1; fi
else
echo "Les outils DELL sont manquants..."
exit 1
fi
else
echo "Cette machine est virtuelle : pas de DRAC"
exit 0
fi
#!/bin/bash
sourcelistdell="/etc/apt/sources.list.d/linux.dell.com.sources.list"
ip_lds=`awk -F/ '/ping_url/ {print $3}' /etc/landscape/client.conf`
## Test phys ou virt ?
if ! grep -i qemu /proc/cpuinfo > /dev/null; then
echo "# Généré par script le : $(date -R)" > $sourcelistdell
echo "deb http://$ip_lds/dell/community/deb/latest /" >> $sourcelistdell
echo "deb http://$ip_lds/dell cross-distro dell-firmware" >> $sourcelistdell
apt-get update
apt-get install --force-yes -y srvadmin-all
if [ $? -ne 0 ]; then echo "Installation en erreur; exit 1; fi
fi
exit 0

Quelle température?

omreport chassis temps

Quelle est l'ip de la DRAC ?

omreport chassis remoteaccess config=nic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment