#!/bin/sh

	# ANSI COLORS
	CRE="
[K"
	NORMAL="[0;39m"
	# RED: Failure or error message
	RED="[1;31m"
	# GREEN: Success message
	GREEN="[1;32m"
	# YELLOW: Descriptions
	YELLOW="[1;33m"
	# BLUE: System messages
	BLUE="[1;34m"
	# MAGENTA: Found devices or drivers
	MAGENTA="[1;35m"
	# CYAN: Questions
	CYAN="[1;36m"
	# BOLD WHITE: Hint
	WHITE="[1;37m"


export USAR_NLS=si
export TEXTDOMAIN=instalar
export TEXTDOMAINDIR="/etc/musix/locales"


#Contenido de config/encabezado :

. /etc/musix/funciones-i18n
[ -e /etc/musix/funciones ] && . /etc/musix/funciones



# Si ya está instalado, avisa y pregunta si quiere instalar nuevos programas con synaptic

INSTALLED="no"
[ -e /KNOPPIX/bin/ash ] || INSTALLED="yes"
if [ "$INSTALLED" = "yes" ]
then

#puede ser -nearmouse o -center (o nada)
pos="-nearmouse"
_n "Musix is already installed!

¿Do you want to install new applications?
" | gmessage -title 'Musix GNU+Linux' -file - $pos -buttons $(_n "Yes:0,No:2" ) -default $(_n "Yes")
if [ $? -eq 2 ]; then exit 2; fi

# inicia synaptic como root y sale
kdesu synaptic
exit

fi

echo "Please wait...
(do not close this window...)"

knoppix-installeren


DESTINO=`cat ~/.knofig | grep HD_CHOICE= | cut -f2 -d"'"`

echo "Musix installed on $DESTINO"
sleep 2s
echo "Making last time fixes."
sleep 2s
# borro los initrd para los kernels de Tapsa que quedaron más hechos
chroot /mnt/hdinstall rm /boot/initrd.img-2.6.15.2
chroot /mnt/hdinstall rm /boot/initrd.img-2.6.15.4

# re-hago los initrd para esos kernels
chroot /mnt/hdinstall mkinitrd-musix.sh

exit
