diff options
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; } |