summaryrefslogtreecommitdiffstats
path: root/installer/OpenSLX/OSSetup/Engine.pm
diff options
context:
space:
mode:
authorOliver Tappe2008-09-13 00:19:04 +0200
committerOliver Tappe2008-09-13 00:19:04 +0200
commitb093c750dad436fe07b6ba4faa082a6b1a534408 (patch)
treefb0e0707bdfa5f03756b9feb98a00b582f20d772 /installer/OpenSLX/OSSetup/Engine.pm
parent* improved name of lock used by slxconfig-demuxer (diff)
downloadcore-b093c750dad436fe07b6ba4faa082a6b1a534408.tar.gz
core-b093c750dad436fe07b6ba4faa082a6b1a534408.tar.xz
core-b093c750dad436fe07b6ba4faa082a6b1a534408.zip
* instead of using rm -r to remove a vendor-OS folder, we now use a combination
of 'find' and 'xargs rm -r' to avoid descending into directories on other filesystems - this should finally nail the nasty race condition that could cause loss of the folders mounted into a vendor-OS chroot (/etc/opt/openslx and /opt/openslx). git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2215 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer/OpenSLX/OSSetup/Engine.pm')
-rw-r--r--installer/OpenSLX/OSSetup/Engine.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/installer/OpenSLX/OSSetup/Engine.pm b/installer/OpenSLX/OSSetup/Engine.pm
index 47ba9b3c..b4dab037 100644
--- a/installer/OpenSLX/OSSetup/Engine.pm
+++ b/installer/OpenSLX/OSSetup/Engine.pm
@@ -475,7 +475,9 @@ sub removeVendorOS
0,
_tr("removing vendor-OS folder '%s'...", $self->{'vendor-os-path'})
);
- if (system("rm -r $self->{'vendor-os-path'}")) {
+ if (system(
+ "find $self->{'vendor-os-path'} -xdev -depth -print0 | xargs -0 rm -r"
+ )) {
vlog(
0,
_tr("* unable to remove vendor-OS '%s'!", $self->{'vendor-os-path'})