summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx/taskmanager/tasks/CompileIPxeLegacy.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx/taskmanager/tasks/CompileIPxeLegacy.java')
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/CompileIPxeLegacy.java5
1 files changed, 4 insertions, 1 deletions
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;