From 5618ae055550cf2fb49d874adb3473c07e424b94 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 4 Feb 2022 15:06:46 +0100 Subject: bin/debian-edu-faiinstall: Fix script failure if /srv/tftp/ltsp does not exist. --- bin/debian-edu-faiinstall | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/debian-edu-faiinstall b/bin/debian-edu-faiinstall index a446985..8c4d161 100755 --- a/bin/debian-edu-faiinstall +++ b/bin/debian-edu-faiinstall @@ -90,8 +90,10 @@ fi # keep a copy of /srv/tftp/ltsp if this is the first attempt to deploy # debian-edu-fai on this system -if [ ! -h "${tftpdir}/debian-edu-fai" ]; then +if [ -d "${tftpdir}/debian-edu-fai" ]; then mv "${tftpdir}/ltsp" "${tftpdir}/ltsp.moved-aside-by-debian-edu-fai" +elif [ ! -h "${tftpdir}/debian-edu-fai" ]; then + rm "${tftpdir}/debian-edu-fai" fi # For Debian Edu, we will create the FAI tftp boot dir in subfolder ltsp/. -- cgit v1.2.3