From b093c750dad436fe07b6ba4faa082a6b1a534408 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Fri, 12 Sep 2008 22:19:04 +0000 Subject: * 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 --- installer/OpenSLX/OSSetup/Engine.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'installer/OpenSLX/OSSetup/Engine.pm') 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'}) -- cgit v1.2.3-55-g7522