#!/bin/sh
#
# Granada Microcare Helpdesk
#
# mkarchive... A shell script to create an archive containing enough
# utilities to bring a single user R140 up as muti-user and to mount
# remote filesystems.

cat << INTRO
                          -- mkarchive --

 > This script will create a floppy containing files needed to bring
 > up RISCiX multi-user and to mount the network.
 >
 > The script uses dsplit to create an archive. This will occupy one disc
 > initially but may be extended by editing this script. Insert the first
 > archive disc and press Return to continue.....
 >
 >        ( Type any character key/s and Return to abort  )

INTRO

read STRING
echo
if [ ${STRING}X != "X" ]
then
     echo; echo $0 aborted; echo
     exit 1
fi

# Only Return has been pressed so go ahead and make the archive disc...

cd /
echo; echo " > Creating dsplit archive..." ; echo

# To extend the number of files archived simply add them to this
# file list. Be sure to give FULL pathnames ( starting with a / )
# and escape all except the final end of line with a \ character.

ffd

tar cvf -  /etc/getty /etc/fsck /etc/rc /etc/rc.net \
/etc/rc.config /etc/ttys /etc/ifconfig /etc/restore \
/bin/login /bin/echo /bin/[ /bin/hostname /bin/kill /bin/ps \
/usr/ucb/vi | compress | dsplit -t ARCHIVE

cat << FINISHED

 > Archive disc successfully created. Note that in future this
 > disc will be referred to as the 'Archive disc' and you may 
 > wish to label it accordingly...........

FINISHED

#      ================= END OF SCRIPT =====================
