[pve-devel] [PULL container 5/5] alpine: read /etc/alpine-release

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Feb 12 09:27:34 CET 2016


---
 src/PVE/LXC/Setup/Alpine.pm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Setup/Alpine.pm b/src/PVE/LXC/Setup/Alpine.pm
index 7f7da3a..e35ea5a 100644
--- a/src/PVE/LXC/Setup/Alpine.pm
+++ b/src/PVE/LXC/Setup/Alpine.pm
@@ -14,7 +14,10 @@ use base qw(PVE::LXC::Setup::Base);
 
 sub new {
     my ($class, $conf, $rootdir) = @_;
-    my $self = { conf => $conf, rootdir => $rootdir, version => 0 };
+
+    my $version = PVE::Tools::file_read_firstline("$rootdir/etc/alpine-release");
+
+    my $self = { conf => $conf, rootdir => $rootdir, version => $version };
     $conf->{ostype} = "alpine";
     return bless $self, $class;
 }
-- 
2.1.4





More information about the pve-devel mailing list