# By			: Nguyen Tu.
# Website		: https://www.aioboot.com (AIO Boot).
# Last modified	: 05.03.2018.
# Description	: Find and load the configuration files of Grub2 and Syslinux.

echo "${searchcfgmessage}"
set k="_"
for dev in (*); do
	regexp -s device '\((.*)\)' $dev
	if ! searchindevice "$device" "on"; then continue; fi
	probe -s fstype -f $device
	if [ -z "$fstype" ] -o [ "$fstype" == "procfs" ]; then continue; fi
	probe -s vollabel -l $device
	if [ -z "$vollabel" ]; then set vollabel="${noname}"; fi
	probe -s voluuid -u $device
	GetConfigFile "$device" "$vollabel" "$fstype" "$voluuid"
	unset fstype
	unset vollabel
	unset voluuid
done
source ${prefix}/ReturnMain.cfg