mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
more changes to footprint
This commit is contained in:
parent
43a710fa5f
commit
c125329bef
2 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
# create a diagnostic footprint of network, and OS settings
|
||||
# create a diagnostic diagnostics of network, and OS settings
|
||||
|
||||
read -p "\n\nPlease identiy yourself (<8 characters, no spaces)" who
|
||||
if [ -z "$who" ]; then
|
||||
|
@ -15,8 +15,8 @@ YMD=$(date +%y%m%d)
|
|||
popd
|
||||
|
||||
SCRIPTDIR=$(cd `dirname $0` pwd)
|
||||
footprint_name=${OS_VER}-$YMD-$who
|
||||
basket=$footprint_name.$$
|
||||
diagnostics_name=${OS_VER}-$YMD-$who
|
||||
basket=$diagnostics_name.$$
|
||||
VARS_VALUES=/tmp/all-vars
|
||||
|
||||
# record all the ansible variables
|
||||
|
@ -139,10 +139,10 @@ if [ -f "$VARS_VALUES" ]; then
|
|||
cp -p "$VARS_VALUES" /tmp/$basket
|
||||
fi
|
||||
|
||||
mkdir -p /etc/iiab/footprint
|
||||
if [ ! -z $footprint_name ];then
|
||||
mkdir -p /etc/iiab/diagnostics
|
||||
if [ ! -z $diagnostics_name ];then
|
||||
pushd /tmp > /dev/null
|
||||
tar czf /etc/iiab/footprint/$basket.tgz $basket/*
|
||||
tar czf /etc/iiab/diagnostics/$basket.tgz $basket/*
|
||||
popd > /dev/null
|
||||
rm -rf /tmp/$basket
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue