#!/bin/bash SERVER_SERIAL=`dmidecode -s chassis-serial-number` MY_DATETIME=`date +%Y-%m-%d_%H-%M-%S` OUTPUT_HOME=/output/hwtests OUTPUT_DIR=$OUTPUT_HOME/$SERVER_SERIAL SNAPSHOT_D=$OUTPUT_HOME/snapshot/$SERVER_SERIAL/$MY_DATETIME export SERVER_SERIAL export OUTPUT_DIR export SNAPSHOT_D mkdir -p $OUTPUT_DIR if [ ! -f $OUTPUT_DIR/dmidecode ] ; then dmidecode > $OUTPUT_DIR/dmidecode fi