1 |
root |
1 |
#!/bin/sh
|
|
|
2 |
# by 3abtux (with debug helps by Michel GAUDET)
|
|
|
3 |
DIR_TMP="/var/log/mondo"
|
|
|
4 |
DIR_ISO="/var/Save/ISO"
|
|
|
5 |
date=`date +%F-%Hh%M`
|
|
|
6 |
HOSTNAME=`hostname -s`
|
|
|
7 |
ROOT="root"
|
|
|
8 |
ISOFile=$HOSTNAME-$date
|
|
|
9 |
EXCLUDE="$DIR_ISO $DIR_TMP /tmp /mnt /media"
|
|
|
10 |
|
|
|
11 |
echo "Les répertoires exclus de l'image ISO sont : $EXCLUDE "
|
|
|
12 |
echo "##################################################"
|
|
|
13 |
echo "# Création de l'archive ISO système d'Alcasar ! #"
|
|
|
14 |
echo "##################################################"
|
|
|
15 |
echo ""
|
|
|
16 |
echo "--------------------------------------------------------"
|
|
|
17 |
echo "Les ISOs seront disponibles dans le répertoire suivant :"
|
|
|
18 |
echo "==--> $DIR_ISO"
|
|
|
19 |
/bin/touch $DIR_ISO/creation-of-the-current-archive
|
|
|
20 |
mkdir $DIR_TMP
|
|
|
21 |
/bin/nice -n 19 /usr/sbin/mondoarchive -p $ISOFile -Oi -s 4300m -d $DIR_ISO -T $DIR_TMP -S $DIR_TMP -E "$EXCLUDE"
|
|
|
22 |
cd $DIR_ISO
|
|
|
23 |
for i in `ls *.iso` ;do
|
|
|
24 |
/usr/bin/md5sum $i > $i.md5
|
|
|
25 |
done
|
|
|
26 |
rm -rf $DIR_TMP/mondo.scratch.* $DIR_TMP/tmp.mondo.* $DIR_TMP/.*.dat
|
|
|
27 |
rm -f $DIR_ISO/creation-of-the-current-archive
|
|
|
28 |
exit 0
|