#!/bin/sh
# These tasks are performed once, on the initial boot of the system.
# After they are performed, the system is rebooted automatically.
# ----------------------------------------------------------------

MODDEP=/lib/modules/`uname -r`/modules.dep

case "$1" in
  start)
    if [ ! -f /etc/firstboot ]
    then
        echo "Running firstboot..."
    
        # Update driver dependencies lists
        depmod

        # Update the shared libraries links and cache.
        /sbin/ldconfig
    
        # Place the stamp file to prevent running this script again.
        touch /etc/firstboot

        # reboot the system
        /sbin/reboot
    fi
    ;;

  stop)
    ;;

  restart)
    ;;

  *)
    echo $"Usage: $0 {start}"
    exit 1
esac

exit $?

