diff options
author | Oliver Tappe | 2007-03-17 16:12:26 +0100 |
---|---|---|
committer | Oliver Tappe | 2007-03-17 16:12:26 +0100 |
commit | 13741de77584dd38da9fd2f911c54e1bff0648ea (patch) | |
tree | dcfb867f6a9d9d1f301703ef142a0a2eb89e5038 /installer/OpenSLX | |
parent | * added executeInSubprocess() which encapsulates the starting and (diff) | |
download | core-13741de77584dd38da9fd2f911c54e1bff0648ea.tar.gz core-13741de77584dd38da9fd2f911c54e1bff0648ea.tar.xz core-13741de77584dd38da9fd2f911c54e1bff0648ea.zip |
* switched from using system() to slxsystem()
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@782 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/OpenSLX')
-rw-r--r-- | installer/OpenSLX/OSSetup/MetaPackager/yum.pm | 12 | ||||
-rw-r--r-- | installer/OpenSLX/OSSetup/Packager/rpm.pm | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm index ca472074..de03ffe1 100644 --- a/installer/OpenSLX/OSSetup/MetaPackager/yum.pm +++ b/installer/OpenSLX/OSSetup/MetaPackager/yum.pm @@ -48,9 +48,9 @@ sub setupPackageSource $repoURL .= "/$repoInfo->{'repo-subdir'}"; } my $repoDescr = "[$repoName]\nname=$repoInfo->{name}\nbaseurl=$repoURL\n"; - system("cp /proc/cpuinfo $self->{engine}->{'vendor-os-path'}/proc"); - system("rm -f $self->{engine}->{'vendor-os-path'}/etc/yum.repos.d/*"); - system("mkdir -p $self->{engine}->{'vendor-os-path'}/etc/yum.repos.d"); + slxsystem("cp /proc/cpuinfo $self->{engine}->{'vendor-os-path'}/proc"); + slxsystem("rm -f $self->{engine}->{'vendor-os-path'}/etc/yum.repos.d/*"); + slxsystem("mkdir -p $self->{engine}->{'vendor-os-path'}/etc/yum.repos.d"); my $repoFile = "$self->{engine}->{'vendor-os-path'}/etc/yum.repos.d/$repoName.repo"; open(REPO, "> $repoFile") @@ -63,7 +63,7 @@ sub updateBasicVendorOS { my $self = shift; - if (system("yum -y update")) { + 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"); @@ -77,10 +77,10 @@ sub installSelection my $self = shift; my $pkgSelection = shift; - if (system("yum -y install $pkgSelection")) { + if (slxsystem("yum -y install $pkgSelection")) { die _tr("unable to install selection (%s)\n", $!); } - system('rm /proc/cpuinfo'); + slxsystem('rm /proc/cpuinfo'); } 1;
\ No newline at end of file diff --git a/installer/OpenSLX/OSSetup/Packager/rpm.pm b/installer/OpenSLX/OSSetup/Packager/rpm.pm index 9956245a..06a808c8 100644 --- a/installer/OpenSLX/OSSetup/Packager/rpm.pm +++ b/installer/OpenSLX/OSSetup/Packager/rpm.pm @@ -35,7 +35,7 @@ sub unpackPackages foreach my $pkg (@$pkgs) { vlog 2, "unpacking package $pkg..."; - if (system("ash", "-c", "rpm2cpio $pkg | cpio -i -d")) { + if (slxsystem("ash", "-c", "rpm2cpio $pkg | cpio -i -d -u")) { warn _tr("unable to unpack package <%s> (%s)", $pkg, $!); # TODO: change this back to die() if cpio-ing fedora6-glibc # doesn't crash anymore... (needs busybox update, I suppose) @@ -53,7 +53,7 @@ sub importTrustedPackageKeys foreach my $keyFile (@$keyFiles) { vlog 2, "importing package key $keyFile..."; - if (system("rpm", "--root=$finalPath", "--import", "$keyFile")) { + if (slxsystem("rpm", "--root=$finalPath", "--import", "$keyFile")) { die _tr("unable to import package key <%s> (%s)\n", $keyFile, $!); } } @@ -67,11 +67,11 @@ sub installPrerequiredPackages return unless defined $pkgs && scalar(@$pkgs); - if (system("rpm", "--root=$finalPath", "-ivh", "--nodeps", "--noscripts", + if (slxsystem("rpm", "--root=$finalPath", "-ivh", "--nodeps", "--noscripts", "--force", @$pkgs)) { die _tr("error during prerequired-package-installation (%s)\n", $!); } - system("rm", "-rf", "$finalPath/var/lib/rpm"); + slxsystem("rm", "-rf", "$finalPath/var/lib/rpm"); } sub installPackages @@ -82,7 +82,7 @@ sub installPackages return unless defined $pkgs && scalar(@$pkgs); - if (system("rpm", "--root=$finalPath", "-ivh", @$pkgs)) { + if (slxsystem("rpm", "--root=$finalPath", "-ivh", @$pkgs)) { die _tr("error during package-installation (%s)\n", $!); } } |