#!/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

# Check if firstboot has already been run once.
if [ ! -f /etc/firstboot.complete ]
then
    echo "Running firstboot..."
    
    # Update driver dependencies lists
    depmod

    # Update the shared libraries links and cache.
    /sbin/ldconfig

    # Update GTK icon cache
    gtk-update-icon-cache -q -f -t /usr/share/icons/hicolor

	# Fix /root permissions
	chmod 550 /root
    
    # Place the stamp file to prevent running this script again.
    touch /etc/firstboot
fi

exit $?

