Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/pxeconfig/mcore-pxeconfig.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2687 by niro, Fri Dec 11 09:55:07 2015 UTC revision 2688 by niro, Fri Dec 11 10:19:48 2015 UTC
# Line 53  symlink_pxe_clients() Line 53  symlink_pxe_clients()
53   local config   local config
54    
55   # remove all symlinks but keep file based configs   # remove all symlinks but keep file based configs
56   for i in $(find ${TFTP_DIRECTORY} -name 01-\*)   find ${TFTP_DIRECTORY} -name 01-\* -type l | xargs --no-run-if-empty rm
  do  
  [[ -L ${TFTP_DIRECTORY}/${i} ]] && rm ${TFTP_DIRECTORY}/${i}  
  done  
57    
58   ids=$(mysqldo "select serial from client_serials where enabled='1' and location <> '';")   ids=$(mysqldo "select serial from client_serials where enabled='1' and location <> '';")
59   for serial in ${ids}   for serial in ${ids}
# Line 66  symlink_pxe_clients() Line 63  symlink_pxe_clients()
63   then   then
64   config="${TFTP_DIRECTORY}/01-${client_serials_mac//:/-}"   config="${TFTP_DIRECTORY}/01-${client_serials_mac//:/-}"
65   # do not update if an individual config file exist   # do not update if an individual config file exist
66   if [[ -e ${config} ]]   if [[ -f ${config} ]]
67   then   then
68   echo "A config file named '${config}' already exist"   echo "A config file named '${config}' already exist"
69   else   else

Legend:
Removed from v.2687  
changed lines
  Added in v.2688