#!/bin/sh -e

[ -n "$GLOBAL_HOMEROS" ] || exit 0

/bin/ln -s /etc/tts.d/mbrola.voiceman /etc/voiceman.d/mbrola.output
/bin/ln -s /etc/tts.d/rhvoice.voiceman /etc/voiceman.d/rhvoice.output

/sbin/chkconfig --del dm
/sbin/chkconfig livecd-setlocale off
/sbin/chkconfig plymouth off
/sbin/chkconfig alteratord off

/sbin/chkconfig --add voiceman
/sbin/chkconfig --add musitorius
/sbin/chkconfig acpid on

if [ -n "$GLOBAL_HOMEROS_FRIEND" ]; then
    /sbin/chkconfig --add homeros-emacs-menu
fi

echo 'KEYTABLE=ruwin_ct_sh-UTF-8' > /etc/sysconfig/keyboard

cat <<EOF > /etc/sysconfig/i18n
LANG=ru_RU.UTF-8
SUPPORTED=ru_RU.UTF-8
EOF

#FIXME:always added link to i586 repo; 
cat <<EOF > /etc/apt/sources.list.d/sources.list
#ALT Linux Sisyphus;

rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus i586 classic
rpm [alt] http://ftp.altlinux.org/pub/distributions/ALTLinux/Sisyphus noarch classic
EOF

echo 'ALT Linux Homeros Friend (Mongareson) Beta' > /etc/altlinux-release