From 16772623bb13b9af57999247a619cc5baed1dd60 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 27 Oct 2015 15:22:05 -0400 Subject: [PATCH] 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 --- xCAT-server/share/xcat/install/scripts/post.xcat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xCAT-server/share/xcat/install/scripts/post.xcat b/xCAT-server/share/xcat/install/scripts/post.xcat index 0ad6ce8e6..996f44c57 100755 --- a/xCAT-server/share/xcat/install/scripts/post.xcat +++ b/xCAT-server/share/xcat/install/scripts/post.xcat @@ -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"')