#!/bin/sh # http://www.phys.ethz.ch/~franklin/Projects/dphys2/makerescue # - download an rescue floppy image from Debian mirror # copyright ETH Zuerich Physics Deparement, use under either BSD or GPL license # author Neil Franklin, last modification 2002.12.18 # this script is intended to be run as root, it will fail if run as user! # ------ read in configuration . ./setup-dphys2 # ------ from here on code to do the actual actions # --- test if we can work if [ ! ${USER} = root ] ; then echo "sorry, you need to run this script as root - aborting ..." exit 1 fi # --- get ready for work if [ ! -d ${WORKDIR} ] ; then mkdir -p ${WORKDIR} fi # --- fetch stuff to work on /bin/echo "----------------------------------------------------------------" /bin/echo "*** downloading rescue disk image *** from ${CONF_DEBSERVER} ..." /bin/sleep ${SLEEP} # -N to only newer is fetched, save waisting bandwidth if already here # if user wants to force download, use an make clean before wget -N -P ${WORKDIR} http://${CONF_DEBSERVER}/${CONF_DEBDIR}/${DEBRESCUE} # --- tell make that this rescue.bin.gz is up to date # so that installrescue does not go and re-fetch it touch ${WORKDIR}/rescue.bin