11 |
#%before: |
#%before: |
12 |
#%after: |
#%after: |
13 |
|
|
14 |
# $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/init.d/alxsettings,v 1.9 2008-06-05 17:17:49 niro Exp $ |
# $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/init.d/alxsettings,v 1.10 2008-06-05 17:23:07 niro Exp $ |
15 |
|
|
16 |
# checks first if the client was already configured and if it has an valid serial |
# checks first if the client was already configured and if it has an valid serial |
17 |
# if not it runs the autoconfiguration script |
# if not it runs the autoconfiguration script |
639 |
reboot |
reboot |
640 |
} |
} |
641 |
|
|
|
onboot_interface_list() |
|
|
{ |
|
|
local file |
|
|
local devices |
|
|
local iface |
|
|
|
|
|
# get list of all devices |
|
|
for file in $@ |
|
|
do |
|
|
if [[ $(read_value ONBOOT ${file}) = yes ]] |
|
|
then |
|
|
iface="$(basename ${file} | sed s/net.//)" |
|
|
# exclude backup files |
|
|
case "${iface}" in |
|
|
*~) ;; |
|
|
*) devices="${devices} $(basename ${file} | sed s/net.//)" ;; |
|
|
esac |
|
|
fi |
|
|
done |
|
|
|
|
|
echo "${devices}" |
|
|
} |
|
|
|
|
642 |
# read values from net.* files |
# read values from net.* files |
643 |
read_value() |
read_value() |
644 |
{ |
{ |