diff --git a/bin/xen-create-nfs b/bin/xen-create-nfs index 6969c74..5b1dc3a 100755 --- a/bin/xen-create-nfs +++ b/bin/xen-create-nfs @@ -380,6 +380,30 @@ sub testArguments die "Missing NFS root." unless ( $CONFIG{ 'nfs_root' } ); + # Shorthack to fix http://bugs.debian.org/648814 -- xen-create-nfs + # should better use xt-create-xen-config instead. Guess from where + # this code is borrowed for now... + + if ( exists($CONFIG{ 'memory' }) and + defined($CONFIG{ 'memory' }) ) { + + # + # The memory size: Convert Gb -> Mb. + # + if ( $CONFIG{ 'memory' } =~ /^(\d+)Gb.*$/i ) + { + $CONFIG{ 'memory' } = $1 * 1024; + } + + # + # Remove any trailing Mb. + # + if ( $CONFIG{ 'memory' } =~ /^(\d+)Mb.*$/i ) + { + $CONFIG{ 'memory' } = $1; + } + + } # All OK. } diff --git a/debian/changelog b/debian/changelog index 4852fd2..59b383c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ xen-tools (4.2.1+dev-1) UNRELEASED; urgency=low - Correctly checks and documents valid values for disk_device. (Closes: #621499) * Support creating Ubuntu 11.10 Oneiric DomUs (LP: #848654) + * Workaround for missing unit parsing in xen-create-nfs (Closes: + #648814) * Fix wildcard vs regexp in memory configuration parsing. * Fix Lintian warning copyright-refers-to-symlink-license.