From: udo@umunk.GUN.de (Udo Munk)
Newsgroups: comp.os.coherent
Subject: Re: Installing OS/2, DOS, Coherent ... Help !!!
Date: 14 Aug 92 05:30:39 GMT
Organization: umunk (private)
X-Newsreader: Tin 1.1 PL4

karl@dadoka.h.ni.schule.de (Karl Sarnow) writes:
: udo@umunk.GUN.de (Udo Munk) writes:
: 
: > If there is any interest on this script I'll post it here, it's not
: > very large.
: 
: Yes please do so.
: 
: Karl

I've got some replys, also for a script which creates a bootable disk
with Coherent. Because my emergency boot disk is made from Coherent 3.0
now the time is come to create a new one under Coherent 4.0. This time
I'll also write a script, which creates this emergency boot disk, to
help those of us who can't do that by them selfe.

But here first the script, which copys all system files to a disk:

----- cut here -----
# shell script to backup Coherent's system files to disk
# Should work with Coherent 3.x and Coherent 4.0.
# At the end of the file are the installation dependent files, 
# please change to your needing.
# Written by Udo Munk (udo@umunk.GUN.de)

# the output device:
OUTDEV=/dev/fva1

echo -n "Put a disk with a filesystem in $OUTDEV and hit return: "
read dummy
/etc/mount $OUTDEV /mnt

echo "Copying files in / ..."
cp .profile /mnt
cp backup /mnt

echo "Copying files in /bin ..."
if [ ! -d /mnt/bin ]
then
	mkdir /mnt/bin
fi
cp /bin/mount /mnt/bin
cp /bin/umount /mnt/bin

echo "Copying files in /etc ..."
if [ ! -d /mnt/etc ]
then
	mkdir /mnt/etc
fi
cp /etc/.profile /mnt/etc
cp /etc/brc /mnt/etc
cp /etc/checklist /mnt/etc
cp /etc/domain /mnt/etc
cp /etc/drvld.all /mnt/etc
cp /etc/group /mnt/etc
cp /etc/logmsg /mnt/etc
cp /etc/modemcap /mnt/etc
cp /etc/motd /mnt/etc
cp /etc/mount.all /mnt/etc
cp /etc/newusr /mnt/etc
cp /etc/passwd /mnt/etc
cp /etc/profile /mnt/etc
cp /etc/rc /mnt/etc
cp /etc/serialno /mnt/etc
cp /etc/shutdown /mnt/etc
cp /etc/termcap /mnt/etc
cp /etc/timezone /mnt/etc
cp /etc/ttys /mnt/etc
cp /etc/umount.all /mnt/etc
cp /etc/uucpname /mnt/etc

# if available copy files in /etc/default
if [ -d /etc/default ]
then
	echo "Copying files in /etc/default ..."
	cpdir /etc/default /mnt/etc/default
fi

echo "Copying files in /usr/bin ..."
if [ ! -d /mnt/usr ]
then
	mkdir /mnt/usr
fi
if [ ! -d /mnt/usr/bin ]
then
	mkdir /mnt/usr/bin
fi
cp /usr/bin/modeminit /mnt/usr/bin
cp /usr/bin/ramdisk /mnt/usr/bin

echo "Copying files in /usr/lib ..."
if [ ! -d /mnt/usr/lib ]
then
	mkdir /mnt/usr/lib
fi
if [ -f /usr/lib/crontab ]
then
	cp /usr/lib/crontab /mnt/usr/lib
fi
cp /usr/lib/units /mnt/usr/lib

echo "Copying files in /usr/lib/mail ..."
if [ ! -d /mnt/usr/lib/mail ]
then
	mkdir /mnt/usr/lib/mail
fi
cp /usr/lib/mail/aliases /mnt/usr/lib/mail
cp /usr/lib/mail/paths /mnt/usr/lib/mail

echo "Copying files in /usr/lib/uucp ..."
if [ ! -d /mnt/usr/lib/uucp ]
then
	mkdir /mnt/usr/lib/uucp
fi
cp /usr/lib/uucp/L-devices /mnt/usr/lib/uucp
cp /usr/lib/uucp/L.sys /mnt/usr/lib/uucp
cp /usr/lib/uucp/Permissions /mnt/usr/lib/uucp

# if available save /usr/lib/news
if [ -d /usr/lib/news ]
then
	if [ ! -d /mnt/usr/lib/news ]
	then
		mkdir /mnt/usr/lib/news
	fi
	echo "Copying files in /usr/lib/news ..."
	cp /usr/lib/news/active /mnt/usr/lib/news
	cp /usr/lib/news/distributions /mnt/usr/lib/news
	cp /usr/lib/news/newsgroups /mnt/usr/lib/news
	cp /usr/lib/news/organization /mnt/usr/lib/news
	cp /usr/lib/news/sys /mnt/usr/lib/news
fi

# if available save /usr/spool/cron/crontabs
if [ -d /usr/spool/cron/crontabs ]
then
	if [ ! -d /mnt/usr/spool ]
	then
		mkdir /mnt/usr/spool
	fi
	if [ ! -d /mnt/usr/spool/cron ]
	then
		mkdir /mnt/usr/spool/cron
	fi
	echo "Copying files in /usr/spool/cron/crontabs ..."
	cpdir /usr/spool/cron/crontabs /mnt/usr/spool/cron/crontabs
fi

# save /usr/local/lib
# these are my personal needs! edit for your own!
if [ ! -d /mnt/usr/local ]
then
	mkdir /mnt/usr/local
fi
if [ ! -d /mnt/usr/local/lib ]
then
	mkdir /mnt/usr/local/lib
fi
echo "Copying files in /usr/local/lib ..."
cp /usr/local/lib/Cu.sys /mnt/usr/local/lib
cpdir /usr/local/lib/xc /mnt/usr/local/lib/xc
cpdir /usr/local/lib/minicom /mnt/usr/local/lib/minicom

/etc/umount $OUTDEV
/etc/fsck $OUTDEV
echo "Backup ready, remove disk from $OUTDEV."
----- cut here -----
--
Udo Munk     | voice:      +49 2131 275348             | uucp: +49 2131 278869
Oberstr. 21  | mail :      udo@umunk.GUN.de            |     2400/1200/300 8N1
4040 Neuss 1 | ...!{mcshh,smurf,unido}!easix!umunk!udo | MYNAME=bbsuser
Fed. Rep. of | CompuServe: 100021,2515                 | login: uucp
Germany      | at first connect get ~/info  and ~/files| pwd:   public
Newsgroups: comp.os.coherent