2016-12-12 12:25:14 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-12-21 17:41:24 -06:00
|
|
|
SERVER_SERIAL=`dmidecode -s chassis-serial-number | sed 's/\s.*$//'`
|
2016-12-12 13:31:26 -06:00
|
|
|
MY_DATETIME=`date +%Y-%m-%d_%H-%M-%S`
|
2016-12-13 18:31:14 -06:00
|
|
|
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
|
2016-12-13 18:31:14 -06:00
|
|
|
export SNAPSHOT_D
|
|
|
|
mkdir -p $OUTPUT_DIR
|
2016-12-12 13:31:26 -06:00
|
|
|
|
2016-12-22 23:27:05 -06:00
|
|
|
if [[ ! -f $OUTPUT_DIR/dmidecode ]] ; then
|
2016-12-12 13:31:26 -06:00
|
|
|
dmidecode > $OUTPUT_DIR/dmidecode
|
|
|
|
fi
|
2016-12-12 12:25:14 -06:00
|
|
|
|
2016-12-13 18:31:14 -06:00
|
|
|
|