diff mbox

[2/3] standalong-reset: Use the $suite when recreating soft links.

Message ID 1477505649-84103-3-git-send-email-konrad.wilk@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Konrad Rzeszutek Wilk Oct. 26, 2016, 6:14 p.m. UTC
Commit ef3a6f2162ced5cfeb08b437315b69ad1ddbc5ed:
"Add -$suite suffix to TftpDiVersion in code"
forgot to include the $suite parameter when re-linking
current-$suite against the <date>-$suite.

Specifically after we have downloaded the debian files the
$TftpDir has:

 konrad konrad 4096 paź 26 13:29 2016-10-26-jessi
 konrad konrad   17 paź 26 13:29 current-jessie -> 2016-10-26-jessi

we end up removing the symlink (current-jessie) and then
recreating it as:

 konrad konrad 4096 paź 26 13:29 2016-10-26-jessi
 konrad konrad   10 paź 26 13:29 current-jessie -> 2016-10-2

which is wrong as there is no '2016-10-2' directory.

The patch is to add the $suite in the linking.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
CC: Marcos Matsunaga <Marcos.Matsunaga@oracle.com>
---
 standalone-reset | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/standalone-reset b/standalone-reset
index 7f34b61..c587e60 100755
--- a/standalone-reset
+++ b/standalone-reset
@@ -119,7 +119,7 @@  else
 			div="${div#* }"
 			if [ -n "$div" ] ; then
 			    rm -f "$tftp/$dibase/$arch/current-$suite"
-			    ln -s $div "$tftp/$dibase/$arch/current-$suite"
+			    ln -s $div-$suite "$tftp/$dibase/$arch/current-$suite"
 			fi
 		done
 	fi