if [ ! -d /archives/config ]; then
  dialog --title "Directory /archives/config not found" --msgbox " 
You can't erase any  \
configurations." 9 60 
  exit
fi
cat << EOF > /tmp/choiscript
dialog --title "ERASE a CONFIGURATION" --menu "
You may choose a configuration. 
You can do that with the cursor.
" 20 68 9 \\
EOF

VAR1=`ls /archives/config | wc -l | tail -c2`

if [ $VAR1 = '0' ]; then
exit
fi

for VAR in /archives/config/* ; do
  VAR2=`basename $VAR `
  echo "\"$VAR2\" \"\" \\" >> /tmp/choiscript
done
echo "2> /tmp/choixligne" >> /tmp/choiscript

  . /tmp/choiscript
  if [ ! $? = 0 ]; then rm -f /tmp/choixligne /tmp/choiscript; exit 1; fi
  NOM="`cat /tmp/choixligne`"

dialog --yesno "   Do you REALLY want to ERASE the CONFIG \n\
                   '$NOM' ?" 6 60

         if [ $? != 1 ]; then
                NOM=`cat /tmp/choixligne`
                if [ $NOM != ' ' ]; then
                rm -rf /archives/config/$NOM/
                fi
         fi


  rm -f /tmp/choixligne/

