#!/bin/sh
#
# ROCK Linux: /etc/setup.d/99-finals
#
# This is a ROCK Linux setup script. ROCK Linux set scripts are started
# after a package is installed or manually by the user to (re-)setup a
# package.
#
# Usage: <srcipt-name> [ setup | update | ... ]
#
#   setup:   Run this script interactively and configure the package. But
#            ask if the user would like to configure the package first.
#
#   x-*:     If a script has other non-standard actions, they have to start
#            with 'x-'. E.g. '00-general x-set-tmzone' .
#
#   [a-z]*:  Everything else starting with a lower case letter will be ignored
#            (for future extensions).
#
#   *:       Help. Everything else will print out a usage note.

copy_homefiles() {
	echo '==> installing default root config files <=='
	cp -a /etc/skel/.[!.]* /root
}

sysadmins_todo() {
	echo
	echo "At least we show you a list of topics, to help you to make your"
	echo "system ready. This file is located in /etc/conf/finals.txt if"
	echo "you wish to reread it."
	echo
	less /etc/conf/finals.txt
	echo
}

case "$1" in

	# Configure the system
	#
	setup)
		copy_homefiles ;
		sysadmins_todo ;
		echo ;;

	# Any other non-implemented function
	#
	[a-z]*) ;;

	# Help
	#
	*)
echo -e ""
echo -e "Usage: /etc/setup.d/99-finals  [ action ]"
echo -e ""
echo -e "\t\tsetup   Confgure the system:"
echo -e ""
echo -e "\t\t--help, -h, -?  Help"
echo -e ""
		;;

esac

exit 0
