Bug#366403: xen-tools: abort on existing image files
Package: xen-tools Version: 1.3-1 Severity: wishlist Hello, xen-create-image will overwrite existing files. perhaps a command line option should be added to force overwriting and refuse to overwrite files as default? regards bd -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.16-xen Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages xen-tools depends on: ii debootstrap 0.3.3 Bootstrap a basic Debian system ii libterm-size-perl 0.2-2 Perl extension for retrieving term ii perl-modules 5.8.8-4Core Perl modules Versions of packages xen-tools recommends: pn reiserfsprogs none (no description available) pn xen none (no description available) pn xfsprogs none (no description available) -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#366403: xen-tools: abort on existing image files
Hi Stefan, Stefan Völkel wrote: Hello, xen-create-image will overwrite existing files. perhaps a command line option should be added to force overwriting and refuse to overwrite files as default? Could you be more specific ? What files are you talking about ? Radu
Bug#366403: xen-tools: abort on existing image files
Hi Radu, xen-create-image will overwrite existing files. perhaps a command line option should be added to force overwriting and refuse to overwrite files as default? Could you be more specific ? What files are you talking about ? Sorry :). I was talking about the image files. Something like this (be advised, this patch is untested): --- xen-create-image.orig 2006-05-05 13:57:05.0 +0200 +++ xen-create-image2006-05-05 13:59:18.0 +0200 @@ -671,6 +671,10 @@ } else { +if ( -f $swap ) { + print ERROR: file exists, aborting.\n); + exit +} $swap_cmd = /bin/dd if=/dev/zero of=$swap bs=1024k count=$CONFIG{'swap'}; } @@ -700,6 +704,10 @@ { # # Loopback +if ( -f $image ) { + print ERROR: file exists, aborting.\n); + exit +} $image_cmd = /bin/dd if=/dev/zero of=$image bs=$CONFIG{'size'} count=0 seek=1024; } regards Stefan -- Do not overtax your powers. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]