diff options
author | Alexander Hoppe | 2009-09-29 17:37:07 +0200 |
---|---|---|
committer | Alexander Hoppe | 2009-09-29 17:37:07 +0200 |
commit | bee10e36eceb880f1d00047892f9365349badfbb (patch) | |
tree | 52cbb07e7e1b490d022498bf1272abd845cb5147 /installer | |
parent | bugfix of "target is a directory" error (diff) | |
download | core-bee10e36eceb880f1d00047892f9365349badfbb.tar.gz core-bee10e36eceb880f1d00047892f9365349badfbb.tar.xz core-bee10e36eceb880f1d00047892f9365349badfbb.zip |
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
Diffstat (limited to 'installer')
-rw-r--r-- | installer/OpenSLX/OSSetup/MetaPackager/yum.pm | 12 |
1 files 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; } |