#!/bin/sh # # Andrey.Ryjov@IT-Secure.COM AKA aryzhov@spasu.net # # Prepare the chrooted environment for the finish scripts: # Loopback necessary mountpoints, # chroot and remount the ufs filesystems listed in client's vfstab, # and mounted on /a/..., onto the target mountpoints [ -z "$SID" ] && SID=/tmp/install_config [ X$SubrIsRead = XYes ] || . $SID/Scripts/Misc/!Includes/Subroutines [ X$VarsAreSet = XYes ] || SetJVars MakeDevices MANDATORY_LOOPBACKS="/etc/mnttab /proc /tmp /cdrom" for D in $MANDATORY_LOOPBACKS ; do mount | egrep -s "^/a$D on " && continue [ -d $D -a ! -d /a$D/. ] && mkdir -p /a$D mount -F lofs $D /a$D || ShellMe "Chroot preparation failed" done