fsck -C -a ${MOUNTDEV}
# Check for the mount point directory and take correct action.
- if [ -d '/virtualbox' ]
+ if [ -d '${IMAGEPATH}' ]
then
- echo "The /virtualbox directory exists and is where we will compose the operations for the image."
+ echo "The ${IMAGEPATH} directory exists and is where we will compose the operations for the image."
else
- echo "Making the /virtualbox directory where we will compose the operations for the image."
- mkdir -p /virtualbox
+ echo "Making the ${IMAGEPATH} directory where we will compose the operations for the image."
+ mkdir -p ${IMAGEPATH}
fi
echo "Attempting to mount local scratch device."
- mount -v ${MOUNTDEV} /virtualbox
+ mount -v ${MOUNTDEV} ${IMAGEPATH}
echo "Setting the session type with /var/cache/gdm/dmrc for gdm3."
# Check for the mount point directory and take correct action.
then
echo "Scratching everything in scratch dir on the fly!"
# On VirtualBox remove a couple of directories.
- rm -rf /virtualbox/Logs
- rm -rf /virtualbox/Snapshots
+ rm -rf ${IMAGEPATH}/Logs
+ rm -rf ${IMAGEPATH}/Snapshots
# Only doing *.* opposed to * since folders with VirtualBox images may be on the same block device.
- rm -f /virtualbox/*.*
+ rm -f ${IMAGEPATH}/*.*
# Also now have to remove local-release.
- rm -f /virtualbox/local-release
+ rm -f ${IMAGEPATH}/local-release
echo "Scratching completed!"
fi
- if [ -f /virtualbox/local-release ]
+ if [ -f ${IMAGEPATH}/local-release ]
then
- . /virtualbox/local-release
+ . ${IMAGEPATH}/local-release
echo "Found local-release: ${RELEASE} "
if [ "${RELEASE}" != "${CRELEASE}" ]
echo "We will take scratch actions."
# On VirtualBox remove a couple of directories.
- rm -rf /virtualbox/Logs
- rm -rf /virtualbox/Snapshots
+ rm -rf ${IMAGEPATH}/Logs
+ rm -rf ${IMAGEPATH}/Snapshots
# Only doing *.* opposed to * since folders with VirtualBox images may be on the same block device.
- rm -f /virtualbox/*.*
+ rm -f ${IMAGEPATH}/*.*
# Also now have to remove local-release.
- rm -f /virtualbox/local-release
+ rm -f ${IMAGEPATH}/local-release
echo "Scratching completed!"
- echo RELEASE=\"${CRELEASE}\" > /virtualbox/local-release
- echo "Rsyncing in some stuff to /virtualbox."
- rsync --exclude ${VDINAME}.vdi -r ${IMAGEPATH}/${VDINAME}/ /virtualbox/
+ echo RELEASE=\"${CRELEASE}\" > ${IMAGEPATH}/local-release
+ echo "Rsyncing in some stuff to ${IMAGEPATH}."
+ rsync --exclude ${VDINAME}.vdi -r ${IMAGEPATH}/${VDINAME}/ ${IMAGEPATH}/
# Link in the big chunks.
- ln -s ${IMAGEPATH}/${VDINAME}/${VDINAME}.vdi /virtualbox
+ ln -s ${IMAGEPATH}/${VDINAME}/${VDINAME}.vdi ${IMAGEPATH}
else
echo "Version match no scratch action taken!"
fi
else
echo "Looks like an initial release setup for version ${CRELEASE}."
- echo RELEASE=\"${CRELEASE}\" > /virtualbox/local-release
- echo "Rsyncing in some stuff to /virtualbox."
- rsync --exclude ${VDINAME}.vdi -r ${IMAGEPATH}/${VDINAME}/ /virtualbox/
+ echo RELEASE=\"${CRELEASE}\" > ${IMAGEPATH}/local-release
+ echo "Rsyncing in some stuff to ${IMAGEPATH}."
+ rsync --exclude ${VDINAME}.vdi -r ${IMAGEPATH}/${VDINAME}/ ${IMAGEPATH}/
# Link in the big chunks.
- ln -s ${IMAGEPATH}/${VDINAME}/${VDINAME}.vdi /virtualbox
+ ln -s ${IMAGEPATH}/${VDINAME}/${VDINAME}.vdi ${IMAGEPATH}
fi
- echo "Setting the permissions on the /virtualbox folder."
- chown -R ${LIVE_USERNAME}:${LIVE_USERNAME} /virtualbox
+ echo "Setting the permissions on the ${IMAGEPATH} folder."
+ chown -R ${LIVE_USERNAME}:${LIVE_USERNAME} ${IMAGEPATH}
echo "Completed custom options for username = ${LIVE_USERNAME} !"
}