#!/bin/sh
#
# vortexbox-firstboot  Run once on firstboot to add functionality.
#
# chkconfig: 35 99 1
# description: To configure elements that need services like mysql 
# running we do it after the first boot
#

initdir=/etc/rc.d/init.d

# Source function library.
. $initdir/functions || exit 0

RETVAL=0
touch /root/install_vortexbox.log
touch /var/tmp/install_vortexbox.log

# See how we were called.
case "$1" in
    start)
	for firstboot_script in `ls -1 /var/vortexbox_load/firstboot/*.sh | sort -n`; do
		echo "Running ${firstboot_script}..."
		. ${firstboot_script} >> /var/tmp/install_vortexbox.log
	done
        ;;
  *)
        echo "Usage: vortexbox-firstboot {start}"
        exit 1
esac

exit $RETVAL

