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 2684 by niro, Fri Dec 11 09:55:07 2015 UTC revision 2768 by niro, Wed Feb 10 15:29:02 2016 UTC
# Line 34  create_pxe_config() Line 34  create_pxe_config()
34   -e "s:@@TIMEOUT@@:${client_locations_pxe_timeout}:g" \   -e "s:@@TIMEOUT@@:${client_locations_pxe_timeout}:g" \
35   -e "s:@@PROMPT@@:${client_locations_pxe_prompt}:g" \   -e "s:@@PROMPT@@:${client_locations_pxe_prompt}:g" \
36   -e "s:@@CONTROLSERVER@@:${client_locations_controlserver}:g" \   -e "s:@@CONTROLSERVER@@:${client_locations_controlserver}:g" \
37     -e "s:@@LOCATION@@:${client_locations_location}:g" \
38   \   \
39   "${TFTP_DIRECTORY}"/lpxelinux-skeleton \   "${TFTP_DIRECTORY}"/lpxelinux-skeleton \
40   > "${TFTP_DIRECTORY}"/lpxelinux-default-"${client_locations_location}"   > "${TFTP_DIRECTORY}"/lpxelinux-default-"${client_locations_location}"
# Line 53  symlink_pxe_clients() Line 54  symlink_pxe_clients()
54   local config   local config
55    
56   # remove all symlinks but keep file based configs   # remove all symlinks but keep file based configs
57   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  
58    
59   ids=$(mysqldo "select serial from client_serials where enabled='1' and location <> '';")   ids=$(mysqldo "select serial from client_serials where enabled='1' and location <> '';")
60   for serial in ${ids}   for serial in ${ids}
# Line 66  symlink_pxe_clients() Line 64  symlink_pxe_clients()
64   then   then
65   config="${TFTP_DIRECTORY}/01-${client_serials_mac//:/-}"   config="${TFTP_DIRECTORY}/01-${client_serials_mac//:/-}"
66   # do not update if an individual config file exist   # do not update if an individual config file exist
67   if [[ -e ${config} ]]   if [[ -f ${config} ]]
68   then   then
69   echo "A config file named '${config}' already exist"   echo "A config file named '${config}' already exist"
70   else   else

Legend:
Removed from v.2684  
changed lines
  Added in v.2768