#!/bin/sh
# <BEGIN COPYRIGHT>
# This file is part of the "Bad Penguin" GNU/Linux distribution
# Copyright (C) 1997-98-99 by Antonio GALLO
# Home Page at ......: http://www.badpenguin.org
# Home Page at ......: http://www.linux.it/~agx/
# e-mail contact ....: mailto:agx@linux.it	mailto:agx@geocities.com
# This program is distributed under the GNU General Public License
# You are not allowed to remove the copyright notice
# <END COPYRIGHT>

# Scelta del profilo al boot
# 1.0.0 by agx@linux.it 


# ----- Costruisce il MENU con la lista dei profili -----
MENU=""
for i in /etc/sysconfig/* ; do
  if [ -d $i ]; then
    MENU="${MENU}`basename $i`  "
  fi
done

# ----- Visualizza il menu' ed effettua la scelta -----
echo
echoc WHITE "L'ultimo profilo utilizzato e' stato $PROFILE"
echoc CYAN "Ecco l'elenco dei profili disponibili ( CTRL+D per uscire)"
color GREEN
select NUOVOPROFILO in $MENU ; do
    if [ "$NUOVOPROFILO" != "" ]; then
	export PROFILE="$NUOVOPROFILO"
	echoc GREEN "Il nuovo profilo utilizzato e' $PROFILE"
	break
    fi
done
color WHITE
