1 | #!/bin/bash
|
---|
2 |
|
---|
3 | ## SAMPLE. Change the mount points to match your environment
|
---|
4 | # - Jim - PROFILE_DIR=${sstk_mount}
|
---|
5 | # - Jim - PROFILE_TYPE=${sstk_mount_type}
|
---|
6 | # - Jim - test -n "$sstk_mount_options" && PROFILE_OPTS="-o $sstk_mount_options"
|
---|
7 |
|
---|
8 | # - Jim - export PROFILENAME=${img}
|
---|
9 |
|
---|
10 | ## Internal Variables, do not modify
|
---|
11 | # - Jim - export TOOLKIT=/TOOLKIT
|
---|
12 | # - Jim - export PROFILE_MNT=/mnt/nfs
|
---|
13 | # - Jim - export HWDISC_FILE=/TOOLKIT/hpdiscovery.xml
|
---|
14 | # - Jim - export SERVERNAME=
|
---|
15 | # - Jim - export BOOTDEVNODE=
|
---|
16 |
|
---|
17 | clear
|
---|
18 | echo "*** Capturing Configuration ***"
|
---|
19 |
|
---|
20 | # - Jim - mkdir -p ${TOOLKIT}/data_files/
|
---|
21 | HWDISC_FILE=/tmp/hpdiscovery.xml
|
---|
22 | export TMPDIR=$(mktemp -t -d liveusb.XXXXXX)
|
---|
23 | mount -t vfat /dev/disk/by-label/LiveUSB $TMPDIR
|
---|
24 |
|
---|
25 | sleep 5
|
---|
26 |
|
---|
27 | echo ""
|
---|
28 | echo "Loading storage drivers for hardware"
|
---|
29 | # - Jim - cd ${TOOLKIT}
|
---|
30 | ./load_modules.sh > /dev/null 2>&1
|
---|
31 |
|
---|
32 |
|
---|
33 | echo ""
|
---|
34 | echo "Pausing to allow drivers to finish loading"
|
---|
35 | sleep 15
|
---|
36 | echo ""
|
---|
37 |
|
---|
38 | ## rerun hardware discovery
|
---|
39 | ./hpdiscovery -f ${HWDISC_FILE} > /dev/null 2>&1
|
---|
40 | echo "Hardware Discovery saved to ${HWDISC_FILE}"
|
---|
41 |
|
---|
42 |
|
---|
43 | ## use hwquery to fetch the SystemName and BootDeviceNode from hardware discovery file. ( extra " " are required )
|
---|
44 | export "`./hwquery ${HWDISC_FILE} allboards.xml SERVERTYPE=SystemName`"
|
---|
45 | export "`./hwquery ${HWDISC_FILE} allboards.xml BOOTDEVNODE=DevNode`";
|
---|
46 |
|
---|
47 | echo "Server Type: ${SERVERTYPE}"
|
---|
48 |
|
---|
49 | # - JIm - mkdir -p ${TOOLKIT}/data_files/
|
---|
50 | ./conrep -s -f${TMPDIR}/data_files/conrep.dat > /dev/null 2>&1
|
---|
51 | if [ $? = 0 ] ; then
|
---|
52 | echo "System Configuration saved to ${TMPDIR}/data_files/conrep.dat"
|
---|
53 | fi
|
---|
54 |
|
---|
55 | ./ifhw ${HWDISC_FILE} allboards.xml "PCI:Smart Array" 2> /dev/null
|
---|
56 | if [ $? = 0 ] ; then
|
---|
57 | hpacuscripting -c ${TMPDIR}/data_files/cpqacuxe.dat
|
---|
58 | if [ $? = 0 ] ; then
|
---|
59 | echo "Array Configuration saved to ${TMPDIR}/data_files/cpqacuxe.dat"
|
---|
60 | fi
|
---|
61 | else
|
---|
62 | echo "No Smart Array detected, no ACU Configuration captured."
|
---|
63 | fi
|
---|
64 |
|
---|
65 | # - JIm - cd ${TOOLKIT}
|
---|
66 | ./ifhw ${HWDISC_FILE} allboards.xml "PCI:Integrated Lights-Out" 2> /dev/null
|
---|
67 | if [ $? = 0 ] ; then
|
---|
68 | modprobe hpilo
|
---|
69 | hponcfg -a -w ${TMPDIR}/data_files/hponcfg.dat
|
---|
70 | if [ $? = 0 ] ; then
|
---|
71 | echo "Integrated Lights-Out Configuration Report saved to ${TMPDIR}/data_files/hponcfg.dat"
|
---|
72 | echo " - this is not a RIBCL configuration script"
|
---|
73 | fi
|
---|
74 | fi
|
---|
75 |
|
---|
76 | ./stop.sh
|
---|