RE: slink_cd v 1.02 - i386 - WORKS! (PATCH INCLUDED)
On Fri, 15 Jan 1999, Jim Westveer wrote:
>> Aha! You've got 3 sets of boot disks in there:
>
>Better to have 3 than none -)
*grin* I guess so...
Anyway, here is a patch to include the fixes/suggestions from today.
Thanks to all the testers out there, especially Jim who seems to have
spent years finding my bugs... :-)
I'm not going to put a new version out now until I get some more arch
support...
=====================================================================
--- slink_cd~ Thu Jan 14 17:48:33 1999
+++ slink_cd Fri Jan 15 17:44:40 1999
@@ -42,8 +42,9 @@
# Location of non-US mirror
NONUS=${NONUS:-$MIRROR/non-US}
-# Path and options to use with mkisofs/mkhybrid
-MKISOFS=${MKISOFS:-"mkhybrid -J -a -r -F -T"}
+# Path and options to use with mkisofs/mkhybrid - one of these should do you
+MKISOFS=${MKISOFS:-"mkhybrid -J -a -r -T"} # For normal users
+#MKISOFS=${MKISOFS:-"mkhybrid -J -a -r -F -T"} # For sym-link farmers...
# TMPDIR must be on the same partition as the mirror for hard links trick
# to work
@@ -342,16 +343,23 @@
fi
echo "Making working copies of config files, converting ARCH to $ARCH"
-for i in $DISKLIST
-do
- for TYPE in list info volid extras optional needed useful
- do
- if [ -e slink$i.$TYPE ] ; then
- echo " slink$i.$TYPE"
- cat slink$i.$TYPE | sed "s/ARCH/$ARCH/g" >$TMPDIR/slink$i.$TYPE
- fi
- done
-done
+if [ -e $TMPDIR/slink1.list ] ; then
+ echo "You already appear to have them. I therefore assume the ones in"
+ echo "$TMPDIR are correct and I will leave them alone. If you"
+ echo "want to generate new ones, delete the file lists in"
+ echo "$TMPDIR and try again."
+else
+ for i in $DISKLIST
+ do
+ for TYPE in list info volid extras optional needed useful
+ do
+ if [ -e slink$i.$TYPE ] ; then
+ echo " slink$i.$TYPE"
+ cat slink$i.$TYPE | sed "s/ARCH/$ARCH/g" >$TMPDIR/slink$i.$TYPE
+ fi
+ done
+ done
+fi
if [ $error -eq 0 ] ; then
if [ "$GENLIST"x = "1"x ] ; then
@@ -763,15 +771,39 @@
echo "upgrade-$ARCH"
(cd slink1 && ln -s dists/stable/main/upgrade-$ARCH)
- # Remove second (old) set of boot-floppies FIXME! SAM
- echo "Removing old boot-floppies"
- rm -rf slink1/dists/stable/main/disks-$ARCH/2.1.0_1998-10-31
-
- # And we don't need dated version if current is _not_ a symlink;
- # broken archive?
- if [ ! -L slink1/dists/stable/main/disks-$ARCH/current ] ; then
- rm -rf slink1/dists/stable/main/disks-$ARCH/2*
+ # Now check the boot-disks; make sure they exist and we
+ # have a "current" directory. If not, exit
+ if [ ! -e slink1/dists/stable/main/disks-$ARCH ] ; then
+ echo "No boot disks found for arch $ARCH."
+ echo "Exit."
+ exit 1
+ fi
+
+ cd slink1/dists/stable/main/disks-$ARCH
+ if [ ! -e current ] ; then
+ echo "No \"current\" boot disks found for arch $ARCH."
+ echo "Exit."
+ exit 1
+ fi
+
+ # OK, we have what we need. Now check and see what mess
+ # things are in. We _don't_ need more than one set of boot
+ # disks and it would be useful if the ftp maintainers
+ # would remove old versions instead of leaving them
+ # around...
+
+ if [ -L current] ; then
+ # Find the link, rename it for safety then put it back
+ CURRENT_LINK=`ls -l current | awk '{print $11}'`
+ mv $CURRENT_LINK .tmp_link
+ rm -rf 2*
+ mv .tmp_link $CURRENT_LINK
+ else
+ # We can simply remove all the others if current is a directory
+ rm -rf 2*
fi
+
+ cd $TMPDIR
# Hack for bootable disks
echo "Copying boot images to <root>/boot for disc 1"
=====================================================================
--
Steve McIntyre, Allstor Software smcintyr@allstor-sw.co.uk
Oh My God! They Killed init! You Bastards!
"Can't keep my eyes from the circling sky,
"Tongue-tied & twisted, Just an earth-bound misfit, I..."
Reply to: