Skip to contentSkip to conversation

standalone-reset: fix check for existing d-i and creation of symlink

PATCH In review Ian Campbell 2 participants 3 messages Nov 1, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 standalone-reset: fix check for existing d-i and creation of symlink

We need to check for "$diver-$suite" not just "$diver" now

Also when creating the current symlink only do so if mg-debian-installer-update did something, since it will now silently ignore unavailable combinations (e.g. armhf on Squeeze)

---
 standalone-reset |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
standalone-reset +5 -3
index 039dfea..8be7e86 100755
@@ -94,14 +94,16 @@ else
 
 	if [ "x$diver" = xcurrent ]; then
 		for arch in i386 amd64 armhf; do
-			if test -d "$tftp/$dibase/$arch/$diver"
+			if test -d "$tftp/$dibase/$arch/$diver-$suite"
 				then continue; fi
 			mkdir -p "$tftp/$dibase/$arch"
 			echo "** need to generate d-i with firmware for $arch"
 			div=`./mg-debian-installer-update \
 					$suite $arch $firmware`
-			rm -f "$tftp/$dibase/$arch/current-$suite"
-			ln -s $div "$tftp/$dibase/$arch/current-$suite"
+			if [ -n "$div" ] ; then
+			    rm -f "$tftp/$dibase/$arch/current-$suite"
+			    ln -s $div "$tftp/$dibase/$arch/current-$suite"
+			fi
 		done
 	fi
 fi
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw

Ian Campbell writes ("[PATCH OSSTEST] standalone-reset: fix check for existing d-i and creation of symlink"):

Quoted 5 lines

We need to check for "$diver-$suite" not just "$diver" now

Also when creating the current symlink only do so if mg-debian-installer-update did something, since it will now silently ignore unavailable combinations (e.g. armhf on Squeeze)

Looks plausible.

#2 lore raw
Quoted 10 lines · Ian Jackson

Ian Campbell writes ("[PATCH OSSTEST] standalone-reset: fix check for existing d-i and creation of symlink"):

Quoted 5 lines

We need to check for "$diver-$suite" not just "$diver" now

Also when creating the current symlink only do so if mg-debian-installer-update did something, since it will now silently ignore unavailable combinations (e.g. armhf on Squeeze)

Looks plausible.

THanks, I've pushed this plus "mg-debian-installer-update: restrict armhf to Wheezy+" (which you acked on IRC) to pretest.

Ian.