Subversion Repositories ALCASAR

Rev

Rev 64 | Blame | Last modification | View Log

#!/bin/sh
# $Id: alcasar-mondo.sh 518 2011-03-25 16:04:12Z stephane $
# by 3abtux (with debug helps by Michel GAUDET)

DIR_TMP="/var/log/mondo"
DIR_ISO="/var/Save/ISO"
date=`date +%F-%Hh%M`
HOSTNAME=`hostname -s`
ROOT="root"
ISOFile=$HOSTNAME-$date
EXCLUDE="$DIR_ISO $DIR_TMP /tmp /mnt /media" 

echo "Les répertoires exclus de l'image ISO sont :  $EXCLUDE "
echo "##################################################"
echo "# Création de l'archive ISO système d'Alcasar  ! #"
echo "##################################################"
echo ""
echo "--------------------------------------------------------"
echo "Les ISOs seront disponibles dans le répertoire suivant :"
echo "==-->   $DIR_ISO"
/bin/touch $DIR_ISO/creation-of-the-current-archive
mkdir $DIR_TMP
/bin/nice -n 19 /usr/sbin/mondoarchive -p $ISOFile -Oi -s 4300m -d $DIR_ISO -T $DIR_TMP -S $DIR_TMP -E "$EXCLUDE"
cd $DIR_ISO
for i in `ls *.iso` ;do
        /usr/bin/md5sum $i > $i.md5
done
rm -rf $DIR_TMP/mondo.scratch.* $DIR_TMP/tmp.mondo.* $DIR_TMP/.*.dat
rm -f $DIR_ISO/creation-of-the-current-archive
exit 0