--- mcore-src/trunk/mcore-tools/src/modules/pxeconfig/mcore-pxeconfig.in 2015/12/11 09:55:07 2684 +++ mcore-src/trunk/mcore-tools/src/modules/pxeconfig/mcore-pxeconfig.in 2015/12/11 10:19:48 2688 @@ -53,10 +53,7 @@ local config # remove all symlinks but keep file based configs - for i in $(find ${TFTP_DIRECTORY} -name 01-\*) - do - [[ -L ${TFTP_DIRECTORY}/${i} ]] && rm ${TFTP_DIRECTORY}/${i} - done + find ${TFTP_DIRECTORY} -name 01-\* -type l | xargs --no-run-if-empty rm ids=$(mysqldo "select serial from client_serials where enabled='1' and location <> '';") for serial in ${ids} @@ -66,7 +63,7 @@ then config="${TFTP_DIRECTORY}/01-${client_serials_mac//:/-}" # do not update if an individual config file exist - if [[ -e ${config} ]] + if [[ -f ${config} ]] then echo "A config file named '${config}' already exist" else