source: ProjectBuilder/projects/proliantusbkey/devel/ssstk/capture.sh@ 1331

Last change on this file since 1331 was 1331, checked in by Bruno Cornec, 13 years ago

Adds a new proliantusbkey project

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.2 KB
Line 
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
17clear
18echo "*** Capturing Configuration ***"
19
20# - Jim - mkdir -p ${TOOLKIT}/data_files/
21HWDISC_FILE=/tmp/hpdiscovery.xml
22export TMPDIR=$(mktemp -t -d liveusb.XXXXXX)
23mount -t vfat /dev/disk/by-label/LiveUSB $TMPDIR
24
25sleep 5
26
27echo ""
28echo "Loading storage drivers for hardware"
29# - Jim - cd ${TOOLKIT}
30./load_modules.sh > /dev/null 2>&1
31
32
33echo ""
34echo "Pausing to allow drivers to finish loading"
35sleep 15
36echo ""
37
38## rerun hardware discovery
39./hpdiscovery -f ${HWDISC_FILE} > /dev/null 2>&1
40echo "Hardware Discovery saved to ${HWDISC_FILE}"
41
42
43## use hwquery to fetch the SystemName and BootDeviceNode from hardware discovery file. ( extra " " are required )
44export "`./hwquery ${HWDISC_FILE} allboards.xml SERVERTYPE=SystemName`"
45export "`./hwquery ${HWDISC_FILE} allboards.xml BOOTDEVNODE=DevNode`";
46
47echo "Server Type: ${SERVERTYPE}"
48
49# - JIm - mkdir -p ${TOOLKIT}/data_files/
50./conrep -s -f${TMPDIR}/data_files/conrep.dat > /dev/null 2>&1
51if [ $? = 0 ] ; then
52 echo "System Configuration saved to ${TMPDIR}/data_files/conrep.dat"
53fi
54
55./ifhw ${HWDISC_FILE} allboards.xml "PCI:Smart Array" 2> /dev/null
56if [ $? = 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
61else
62 echo "No Smart Array detected, no ACU Configuration captured."
63fi
64
65# - JIm - cd ${TOOLKIT}
66./ifhw ${HWDISC_FILE} allboards.xml "PCI:Integrated Lights-Out" 2> /dev/null
67if [ $? = 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
74fi
75
76./stop.sh
Note: See TracBrowser for help on using the repository browser.