#!/bin/sh
# This file is part of Marionnet, a virtual network laboratory
# Copyright (C) 2007  Luca Saiu
# Copyright (C) 2007  Jean-Vincent Loddo

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


#DIR="/boot/"$(date "+%d-%m-%Y.%Hh%M")
DIR="/mnt/hostfs/report-"$(date "+%d-%m-%Y.%Hh%Mm%Ss")
mkdir -p "$DIR" 2>/dev/null
pushd "$DIR"
cp /root/.bash_history bash_history
cfg2html -H -S -f -l
# Copy the HTML version of the report and the latest bash history into the hostfs path:
cp *.html ../report.html
cp bash_history ../bash_history.text
#gzip *
popd
