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