From bee10e36eceb880f1d00047892f9365349badfbb Mon Sep 17 00:00:00 2001 From: Alexander Hoppe Date: Tue, 29 Sep 2009 15:37:07 +0000 Subject: included mounting of /proc/ when updating via yum git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3165 95ad53e4-c205-0410-b2fa-d234c58c8868 --- installer/OpenSLX/OSSetup/MetaPackager/yum.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm index a48f6c36..99a10382 100644 --- a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm +++ b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm @@ -61,7 +61,7 @@ sub setupPackageSource my $repoDescr = "[$repoName]\nname=$repoInfo->{name}\nbaseurl=$baseURL$repoSubdir\n"; - + vlog(4,"Adding repo <",$repoName,"> with Base-URL <",$baseURL,"> and Repo-SubDir <",$repoSubdir,">"); foreach my $mirrorURL (@$repoURLs) { $repoDescr .= " $mirrorURL$repoSubdir\n"; } @@ -77,10 +77,11 @@ sub installPackages my $packages = shift; $packages =~ tr{\n}{ }; - + if (slxsystem("mount -t proc proc proc/") != 0){die _tr("unable to mount proc/ for yum \n");}; if (slxsystem("yum -y install $packages")) { die _tr("unable to install selection (%s)\n", $!); } + if(slxsystem("umount proc/") != 0) {_tr("unable to umount proc/")}; return 1; } @@ -100,15 +101,16 @@ sub removePackages sub updateBasicVendorOS { my $self = shift; - + if (slxsystem("mount -t proc proc proc/") != 0){die _tr("unable to mount proc/ for yum \n");}; if (slxsystem("yum -y update")) { if ($! == 2) { # file not found => yum isn't installed die _tr("unable to update this vendor-os, as it seems to lack an installation of yum!\n"); } + if(slxsystem("umount proc/") != 0) {_tr("unable to umount proc/")}; die _tr("unable to update this vendor-os (%s)\n", $!); - } - + } + if(slxsystem("umount proc/") != 0) {_tr("unable to umount proc/")}; return 1; } -- cgit v1.2.3-55-g7522