#!/bin/bash

if [ -e /etc/boot.conf ]; then
	. /etc/boot.conf
else
	. /etc/boot.conf.guinnux
fi

#
# Bring up /proc, so mount san see what it's doing
#
/bin/mount /proc

#
# Clear mtab, and follow with update with new info
#
> /etc/mtab
echo "Mounting filesystems..."
/bin/mount -f /
/bin/mount -f /proc
/bin/mount -a

#
# Load rest of boot scripts
#
for bootstep in ${BOOTSTEPS[*]}; do
	if [ -f "/etc/init.d/$bootstep" ]; then
		"/etc/init.d/$bootstep"
	fi
done

#
# Warn that daemons should be started in this way
#
if [ ${#DAEMONS[@]} -ne 0 ]; then
	echo -n "Warning!!! Daemons are listed in your boot.conf, but this daemon starting framework"
	echo -n "is deprecated. Use the current service installation/removal framework provided by"
	echo -n "install-service and remove-service (sysvinit). Please make the following package's"
	echo    "maintainers aware of the new framework. "
	echo "Offending packages:"
	for offender in ${DAEMONS[*]}; do
		echo $offender
	done
fi
