#!/bin/bash

. ${TOOLKIT}-functions.sh

# check alix gpg key
#
[ $KUSA_MODEL = "alix" ] && {
	apt-key list | grep -q 'Voyage Linux' || {
		keyurl=$(jtconf install.key_alix 2>/dev/null)
		[ "$keyurl" != "" ] && {
			keyfile=$(echo $keyurl | sed -e 's#.*/##')
			wgetfile $keyurl
			echo -n "adding Alix key to apt ... "
			apt-key add $keyfile
		}
	}
}


# cleanup obsolete files
#
uninstallfiles /etc/apt/apt.conf.d/50apt-kusa-allow-unauth


$SOMETHING_CHANGED && {
	echo -en "  repos changed "
	update_repos || exit $?
	echo "ok"
}
exit 0
