From: Ian Campbell Subject: [PATCH OSSTEST v2 2/2] mg-debian-installer-update: Update "current" symlink, if appropriate Date: Fri, 26 Jun 2015 11:31:31 +0100 Message-ID: <1435314691-11496-2-git-send-email-ian.campbell@citrix.com> References: <1435314691-11496-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: In-Reply-To: <1435314691-11496-1-git-send-email-ian.campbell@citrix.com> 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 Where "appropriate" means if TftpDiVersion is set to current, which is the default in standalone mode. The assumption is that someone wuth that configration runs mg-debian-installer-update then they would expected the update to be immediately effective. There was some existing, but commented, code to do this update, reinstate it with the correct condition and adjusting for the addition of -$suite to the patch many moons ago. There is no impact on any production configuration, since they always set TftpDiVersion. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- mg-debian-installer-update | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mg-debian-installer-update b/mg-debian-installer-update index 1595ae5..77d806d 100755 --- a/mg-debian-installer-update +++ b/mg-debian-installer-update @@ -67,6 +67,7 @@ esac pfile=$sbase/non-free/binary-$arch/Packages.gz +tftpdiversion=`getconfig TftpDiVersion` dstroot=`getconfig TftpPath`/`getconfig TftpDiBase`/ date=`date +%Y-%m-%d` dst=$arch/$date-$suite @@ -192,10 +193,12 @@ done rm Packages.gz -#cd $dstroot/$arch -#rm -rf current.new -#ln -s $date current.new -#mv -Tf current.new current +if [ x$tftpdiversion = xcurrent ]; then + cd $dstroot/$arch + rm -rf current-$suite.new + ln -s $date-$suite current-$suite.new + mv -Tf current-$suite.new current-$suite +fi echo "TftpDiVersion $date" echo >&2 "downloaded $dstroot/$dst" -- 2.1.4