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}" |
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} |
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 |