System information
78 Sharing and maintaining SLES 10 SP2 Linux under z/VM
sed -e 's/dasd=1b0-1bf/ro dasd=1b0(ro),1b1(ro),1b2-1b7,1b8(ro),1b9-1bf/g' > \
$TGT/etc/zipl.conf
fi
echo ""
echo "Running zipl in target environment ..."
chroot $TGT zipl
if [ "$?" != 0 ]; then exit 59; fi
echo ""
echo "Copying source /etc/, /root/ and /srv/ to target /local/ ..."
cp -a $TGT/etc $TGT/local
echo "mount -n -o ro --bind /local/.var/lib/rpm /var/lib/rpm" >>
$TGT/local/etc/init.d/boot.local
echo "blogger "RETURN CODE FROM boot.rorpm = $?"" >> $TGT/local/etc/init.d/boot.local
echo ""
echo "Making mountpoint for R/O RPM Database..."
mkdir $TGT/local/.var
if [ "$?" != 0 ]; then exit 60; fi
cp -a $TGT/root $TGT/local
if [ "$?" != 0 ]; then exit 61; fi
cp -a $TGT/srv $TGT/local
if [ "$?" != 0 ]; then exit 62; fi
echo ""
echo "Manipulating /etc/init.d and /sbin on $TGT ..."
chroot $TGT mv /etc/init.d /sbin
chroot $TGT ln -s /sbin/init.d /etc
}
#+--------------------------------------------------------------------------+
function cleanUp()
# Unmount source and target file systems and detach minidisks
#+--------------------------------------------------------------------------+
{
echo ""
echo "Cleaning up ..."
# clean up target disks
umount /mnt/target/opt
umount /mnt/target/var
umount /mnt/target/usr
umount /mnt/target/local
umount /mnt/target/boot
umount /mnt/target/proc
umount /mnt/target/sys
umount /mnt/target
chccwdev -d 21b0
chccwdev -d 21b1
chccwdev -d 21b4
chccwdev -d 21b5
chccwdev -d 21b6
chccwdev -d 21b7
chccwdev -d 21b8
vmcp det 21b0
vmcp det 21b1
vmcp det 21b4
vmcp det 21b5
vmcp det 21b6
vmcp det 21b7
vmcp det 21b8