Fix export of environment variables (dash vs underscore)
Previously they could contain dashes and then were only accessible
from within Perl, but not from within Bash.
From now on potential dashes in environment variable names are
converted to underscores ("_") before being exported. May affect some
hook or role scripts.
This commit is contained in:
@@ -3529,6 +3529,7 @@ sub exportEnvironment
|
||||
|
||||
foreach my $key ( keys %CONFIG )
|
||||
{
|
||||
$key =~ s/-/_/g;
|
||||
if ( defined( $CONFIG{ $key } ) )
|
||||
{
|
||||
$ENV{ $key } = $CONFIG{ $key };
|
||||
|
||||
@@ -398,13 +398,13 @@ sub createXenConfig
|
||||
$ENV{ 'image_suffix' } = '';
|
||||
importPartitionsFromEnvironment();
|
||||
}
|
||||
elsif ( $ENV{ 'image-dev' } )
|
||||
elsif ( $ENV{ 'image_dev' } )
|
||||
{
|
||||
$ENV{ 'image_vbd' } = "phy:$ENV{'image-dev'}";
|
||||
$ENV{ 'image_vbd' } = "phy:$ENV{'image_dev'}";
|
||||
|
||||
if ( $ENV{ 'swap-dev' } )
|
||||
if ( $ENV{ 'swap_dev' } )
|
||||
{
|
||||
$ENV{ 'swap_vbd' } = "phy:$ENV{'swap-dev'}";
|
||||
$ENV{ 'swap_vbd' } = "phy:$ENV{'swap_dev'}";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
8
debian/NEWS
vendored
8
debian/NEWS
vendored
@@ -1,3 +1,11 @@
|
||||
xen-tools (4.4~dev-1) UNRELEASED; urgency=low
|
||||
|
||||
* Exported environment variables no more contain dashes ("-"). Dashes in
|
||||
environment variable names are from now on converted to underscores
|
||||
("_") before being exported. May affect some hook or role scripts.
|
||||
|
||||
-- Axel Beckert <abe@debian.org> Wed, 13 Mar 2013 23:22:20 +0100
|
||||
|
||||
xen-tools (4.2~rc1-1) unstable; urgency=low
|
||||
|
||||
By default, xen-create-image now generates a random root password and
|
||||
|
||||
3
debian/changelog
vendored
3
debian/changelog
vendored
@@ -38,6 +38,9 @@ xen-tools (4.4~dev-1) UNRELEASED; urgency=low
|
||||
- Fix filesystem tools installation in 91-install-fs-tools (which was
|
||||
broken since 4.3~rc1-1) by merging 91-install-fs-tools back into
|
||||
90-make-fstab. Also supports RPM-based distributions now.
|
||||
- Fix export of environment variables. Previously they could contain
|
||||
dashes and then were only accessible from within Perl, but not from
|
||||
within Bash.
|
||||
* Add debian/gbp.conf to be able to to build xen-tools with
|
||||
git-buildpackage.
|
||||
* Clean up debian/rules:
|
||||
|
||||
Reference in New Issue
Block a user