source: ProjectBuilder/projects/proliantusbkey/0.9.6/customized/ssstk/deploy.sh@ 1437

Last change on this file since 1437 was 1437, checked in by Bruno Cornec, 12 years ago

-Use the more generic ILO prefix for variables

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.3 KB
Line 
1#!/bin/bash
2#
3# This script deploys the HP ProLiant BIOS, Smart Array RAID controllers and
4# iLO configurations previously captured on an HP ProLiant server to another
5# HP ProLiant server.
6# Some iLO configuration settings (IP, Administrator's password) can be
7# customized through a file (config/ilo) on the USB key.
8#
9# October 2011
10
11clear
12echo "*** Deploying Configuration ***"
13
14[ -f /ssstk/ssstk-functions ] && . /ssstk/ssstk-functions
15
16# Load the drivers and mount the USB key where the settings will be saved
17ssstk_init
18
19# Deploy ProLiant BIOS configuration
20dos2unix ${BIOS_FILE}
21
22hp-conrep -l -f${BIOS_FILE} -x ${CONREP_XML}
23if [ $? = 0 ] ; then
24 echo "System Configuration data_files/conrep.dat APPLIED"
25else
26 echo "System Configuration data_files/conrep.dat FAILED"
27fi
28
29# Check if a Smart Array controler is installed and deploy the configuration
30$IFHW_CMD ${HWDISC_FILE} "$ALLBOARDS" "PCI:Smart Array" 2> /dev/null
31if [ $? = 0 ] ; then
32 dos2unix ${RAID_FILE}
33 hpacuscripting -reset -i ${RAID_FILE}
34 if [ $? = 0 ] ; then
35 echo "Array Configuration data_files/cpqacuxe.dat APPLIED"
36 else
37 echo "Array Configuration data_files/cpqacuxe.dat FAILED"
38 fi
39else
40 echo "No Smart Array detected, no ACU Configuration applied."
41fi
42
43# Check if an iLO interface is present and deploy its configuration
44$IFHW_CMD ${HWDISC_FILE} "$ALLBOARDS" "PCI:Integrated Lights-Out" 2> /dev/null
45if [ $? = 0 ] ; then
46 modprobe hpilo
47 # Source the customization file
48 [ -f ${ILO_CONFIG_FILE} ] && dos2unix ${ILO_CONFIG_FILE} && . ${ILO_CONFIG_FILE}
49 [ "x$ILO_IP" != "x" ] && OPTS="--ip $ILO_IP"
50 [ "x$ILO_NETMASK" != "x" ] && OPTS="$OPTS --netmask $ILO_NETMASK"
51 [ "x$ILO_GW" != "x" ] && OPTS="$OPTS --gw $ILO_GW"
52 [ "x$ILO_LICENSE" != "x" ] && OPTS="$OPTS --license $ILO_LICENSE"
53 [ "x$ILO_ADMIN_PASSWD" != "x" ] && OPTS="$OPTS --password $ILO_ADMIN_PASSWD"
54 # Do the cleanup and customization of the iLO config file
55 dos2unix ${ILO_FILE}
56 etreeiloclean.py $OPTS $ILO_FILE > ${ILO_UPDATED_FILE}
57 if [ -f ${ILO_UPDATED_FILE} ]; then
58 hponcfg -f ${ILO_UPDATED_FILE}
59 if [ $? = 0 ] ; then
60 echo "Integrated Lights-Out Configuration ${ILO_UPDATED_FILE} APPLIED"
61 else
62 echo "Integrated Lights-Out Configuration ${ILO_UPDATED_FILE} FAILED"
63 fi
64 else
65 echo "Integrated Lights-Out Configuration filtering of hponcfg.dat FAILED"
66 fi
67fi
68
69# Copy the log files if any and unmount the key
70ssstk_stop
Note: See TracBrowser for help on using the repository browser.