From 455c16cefe1771a5846e662c5cc5838136a22d7c Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 13 Oct 2008 19:18:05 +0100 Subject: [PATCH] Abort if the generated configuration file already exists. (Closes: #499475) --- bin/xen-create-image | 12 ++++++++++++ debian/changelog | 3 +++ 2 files changed, 15 insertions(+) diff --git a/bin/xen-create-image b/bin/xen-create-image index 2b2574f..aca00ac 100755 --- a/bin/xen-create-image +++ b/bin/xen-create-image @@ -1802,6 +1802,18 @@ EOF exit 127; } + # + # Already present? + # + my $cfg = + $CONFIG{'output'} . "/" . $CONFIG{'hostname'} . $CONFIG{'extension'}; + if ( -e $cfg ) + { + print "Configuration file already exists; $cfg\n"; + print "Aborting\n"; + exit 127; + } + } diff --git a/debian/changelog b/debian/changelog index 2fc5213..2ae2d4c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ xen-tools (3.9-4) unstable; urgency=medium - Record the ARCH for RPM-based distros. (Closes: #475125) + - Abort if the generated configuration file already exists. + (Closes: #499475) + xen-tools (3.9-3) unstable; urgency=medium