omreport chassis tempsomreport chassis remoteaccess config=nic| #!/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 |