2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-22 19:20:24 +00:00

If TFTPDIR does not begin with /, correct it

TFTPDIR could be set without a leading /.  Support
this syntax by putting a slash in front and hoping
for the best
This commit is contained in:
Jarrod Johnson
2015-10-27 15:22:05 -04:00
parent 8d77f49954
commit 96144aabbb

View File

@@ -19,6 +19,9 @@ if [ -z "$TFTPDIR" ]; then
TFTPDIR="/tftpboot"
fi
if [[ $TFTPDIR != /* ]]; then
TFTPDIR="/"$TFTPDIR
fi
cd /tmp
RAND=$(perl -e 'print int(rand(50)). "\n"')