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