From: Ian Campbell Subject: [PATCH OSSTEST] standalone-reset: fix check for existing d-i and creation of symlink Date: Fri, 1 Nov 2013 09:34:52 +0000 Message-ID: <1383298492-3596-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com Cc: Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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) Signed-off-by: Ian Campbell --- standalone-reset | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/standalone-reset b/standalone-reset index 039dfea..8be7e86 100755 --- a/standalone-reset +++ b/standalone-reset @@ -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 -- 1.7.10.4