#!/bin/sh
format /tmp/disk.list
ROOTDISK=`head -1 /tmp/disk.list`
ROOTFS=/dev/dsk/${ROOTDISK}s0
savekeys()
{
cd /a
echo Preserving ssh/kerb keys
tar cvf /tmp/preserve.tar etc/ssh/*key* etc/krb5.keytab 2>/dev/null
# If some or all files dont exist, tar will exit 1. thats ok.
# if it creates an "empty" tarfile... thats ok too.
cd /
}
if [ "`fstyp ${ROOTFS}`" = "ufs" ] ; then
mount -F ufs -o ro ${ROOTFS} /a
savekeys
umount /a
fi
#!/bin/sh
if test -f /tmp/preserve.tar ; then
echo Extracting preserve.tar from old system
(cd /a && tar xvfp - /tmp/preserve.tar)
fi
Written by: Philip Brown
Bolthole Top
-
Bolthole Solaris Top
-
Search Bolthole.com