#!/bin/sh
#---------------------------------------------------------------------------
# /etc/rc0.d/persistant
# (c) copyright 2002 by Felix Simmet <fli4l@simmet.de>
# see instructions for the licensing terms and conditions
# last modified 2002-02-14 fsi
#----------------------------------------------------------------------------

/usr/local/bin/colecho "save persistant files..." gn

. /etc/persistant.conf

idx=1
while [ "$idx" -le "$PERSISTANT_N" ]
do
	eval source='$PERSISTANT_SOURCE_'$idx
	if [ -f "$source" ]
	then
		eval destination='$PERSISTANT_DESTINATION_'$idx
		/usr/local/bin/colecho "  copy $source to $destination..." wh
		cp $source $destination
	else
		/usr/local/bin/colecho "  cannot find $source..." rd
	fi
	idx=`/usr/bin/expr $idx + 1`
done