#sccs	"@(#)fndetc:.firstrc	1.3"

# .firstrc will be run the first two times the Unix PC is booted from 
# hard disk.  It runs twice becuase in the middle of .firstrc, the system
# is rebooted to force the updating of the system clock, after the user
# has changed it.  This was done to keep the user from changing the time
# zone, without rebooting to have it take effect.
#

#directory where files that are to be converted are kept
CONVDIR=/u/CONV3.5

if [ ! -r /etc/.installdate ]
then

	> /etc/.installdate

	message -i "\
When you start the UNIX pc for the first time, you must set the date \
and time.  Please press Enter, and the system will prompt you for this \
information.\n\nPress Enter to continue."

	/usr/bin/setdate asdf

	message  -i "\
System will now be rebooted to synchronize the system clock.\n\n\
  Press ENTER to continue."

	sync;sync;sync;sync;sync
	reboot
fi

if [ ! -d $CONVDIR ]
then
	rm /etc/.installdate
	date > /etc/.installdate
	chmod -w /etc/.installdate
fi

message -c "\
UNIX provides for a non-office login called \"root\".  You should \
provide a password for this login in order to maintain security for \
your system.  Touch Enter to provide a root password now, or Cancel \
to skip."

if [ "$?" = "0" ]
then
 	password -n root 1
fi
 
message -i "\
To use your telephone with the UNIX pc Telephone software, use the \
Hardware Setup selection of the Administration menu.\nWhen you are \
prompted to log in, please log in as \"install\".\n\n\
  Press ENTER to continue"

set `cat -s /etc/.installdate`
cat > $UA/Backup.menu << END
Menu = Partial Backup includes files changed since $2 $3
Label = Backup
Prompt =Complete Backup saves whole system, Partial Backup saves changed items.

Name = Complete Backup - has not been done yet.
Name = Partial Backup - has not been done yet.
Name = Backup one user
END

echo "`date '+%S'` * * * * /bin/su uucpadm -c \"/usr/lib/uucp/uudemon.hr > /dev/null\" ">> /usr/lib/crontab
