summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSExport/FileSystem/NFS.pm
diff options
context:
space:
mode:
authorDirk von Suchodoletz2008-12-22 21:37:08 +0100
committerDirk von Suchodoletz2008-12-22 21:37:08 +0100
commit0ba05084b60804d89e045edf4e236ccfa8e5bce3 (patch)
treef0a66fbe10832ef1c3da4dec3847a25b869652dc /installer/OpenSLX/OSExport/FileSystem/NFS.pm
parentStarting with qemukvm plugin (another virtualisation environment). (diff)
downloadcore-0ba05084b60804d89e045edf4e236ccfa8e5bce3.tar.gz
core-0ba05084b60804d89e045edf4e236ccfa8e5bce3.tar.xz
core-0ba05084b60804d89e045edf4e236ccfa8e5bce3.zip
Adding inclusion of uclib-rootfs as suggested by Michael. It allows to
run tools like hwinfo or busybox applets within stage4 for testing and other scenarios (like running a very small syslog daemon if no syslog plugin is installed). Found in Stage4 under /opt/openslx/uclib-rootfs. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2446 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/OpenSLX/OSExport/FileSystem/NFS.pm')
-rw-r--r--installer/OpenSLX/OSExport/FileSystem/NFS.pm39
1 files changed, 38 insertions, 1 deletions
diff --git a/installer/OpenSLX/OSExport/FileSystem/NFS.pm b/installer/OpenSLX/OSExport/FileSystem/NFS.pm
index e034b127..86f7c128 100644
--- a/installer/OpenSLX/OSExport/FileSystem/NFS.pm
+++ b/installer/OpenSLX/OSExport/FileSystem/NFS.pm
@@ -61,7 +61,7 @@ sub exportVendorOS
}
$self->_copyViaRsync($source, $target);
-
+ $self->_copyUclibEnv($target);
return;
}
@@ -234,5 +234,42 @@ sub _isTargetBindMounted
return 0;
}
+sub _copyUclibEnv
+{
+ my $self = shift;
+ my $target = shift;
+
+ $target .= "/opt/openslx/uclib-rootfs";
+
+ if (system("mkdir -p $target")) {
+ die _tr("unable to create directory '%s', giving up! (%s)\n",
+ $target, $!);
+ }
+
+ my $uclibcRootfs = "$openslxConfig{'base-path'}/share/uclib-rootfs";
+ my @excludes = qw(
+ dialog
+ kexec
+ libcurses.so*
+ libncurses.so*
+ mconf
+ strace
+ );
+ my $exclOpts = join ' ', map { "--exclude $_" } @excludes;
+ my $includeExcludeList = $self->_determineIncludeExcludeList();
+ vlog(1, _tr("using exclude-filter:\n%s\n", $exclOpts));
+ my $rsyncFH;
+ my $rsyncCmd
+ = "rsync -av --delete-excluded --exclude-from=-" . " $uclibcRootfs/ $target";
+ vlog(2, "executing: $rsyncCmd\n");
+ open($rsyncFH, '|-', $rsyncCmd)
+ or die _tr("unable to start rsync for source '%s', giving up! (%s)",
+ $uclibcRootfs, $!);
+ print $rsyncFH $exclOpts;
+ close($rsyncFH)
+ or die _tr("unable to copy to target '%s', giving up! (%s)",
+ $target, $!);
+ return;
+}
1;