hw-test/scripts/scan-dmidecode

18 lines
390 B
Text
Raw Normal View History

2016-12-12 12:25:14 -06:00
#!/bin/bash
2016-12-16 08:02:21 -06:00
SERVER_SERIAL=`dmidecode -s chassis-serial-number`
2016-12-12 13:31:26 -06:00
MY_DATETIME=`date +%Y-%m-%d_%H-%M-%S`
OUTPUT_HOME=/output/hwtests
2016-12-16 08:02:21 -06:00
OUTPUT_DIR=$OUTPUT_HOME/$SERVER_SERIAL
SNAPSHOT_D=$OUTPUT_HOME/snapshot/$SERVER_SERIAL/$MY_DATETIME
export SERVER_SERIAL
2016-12-12 13:31:26 -06:00
export OUTPUT_DIR
export SNAPSHOT_D
mkdir -p $OUTPUT_DIR
2016-12-12 13:31:26 -06:00
if [ ! -f $OUTPUT_DIR/dmidecode ] ; then
dmidecode > $OUTPUT_DIR/dmidecode
fi
2016-12-12 12:25:14 -06:00