From 9f9fff3228db723be772a84ad20dd9d0ebb178de Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 5 Mar 2019 09:44:10 +0100 Subject: [*IPxe*] Copy legacy files with .0 appended (compat) --- src/main/java/org/openslx/taskmanager/tasks/CompileIPxeLegacy.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/openslx/taskmanager/tasks/CompileIPxeLegacy.java') diff --git a/src/main/java/org/openslx/taskmanager/tasks/CompileIPxeLegacy.java b/src/main/java/org/openslx/taskmanager/tasks/CompileIPxeLegacy.java index 7002be6..6e2e297 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/CompileIPxeLegacy.java +++ b/src/main/java/org/openslx/taskmanager/tasks/CompileIPxeLegacy.java @@ -159,7 +159,10 @@ public class CompileIPxeLegacy extends AbstractTask status.error = "Warning: could not create bootstick image"; } try { - FileUtils.copyFile( new File( "/opt/openslx/ipxe/src/bin/undionly.kkkpxe" ), new File( "/srv/openslx/tftp/ipxelinux.0" ) ); + // Delete first in case it was a symlink + File dest = new File( "/srv/openslx/tftp/ipxelinux.0" ); + FileUtils.deleteQuietly( dest ); + FileUtils.copyFile( new File( "/opt/openslx/ipxe/src/bin/undionly.kkkpxe" ), dest ); } catch ( Exception e ) { status.error = e.toString(); return false; -- cgit v1.2.3-55-g7522