1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
# $Id$ |
3 |
# <niro@magellan-linux.de> |
# <niro@magellan-linux.de> |
4 |
|
|
5 |
#%rlevels: 7:s 0:k 6:k |
#%rlevels: 7:s 0:k 6:k |
11 |
#%before: |
#%before: |
12 |
#%after: |
#%after: |
13 |
|
|
|
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsettings,v 1.27 2005-10-11 12:10:15 niro Exp $ |
|
|
|
|
14 |
# 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 |
15 |
# if not it runs the autoconfiguration script |
# if not it runs the autoconfiguration script |
16 |
# these settings will be used for client setup |
# these settings will be used for client setup |
19 |
# if no changes are at server side they will be kept, if yes the get updated. |
# if no changes are at server side they will be kept, if yes the get updated. |
20 |
# the server settings has higher priority. |
# the server settings has higher priority. |
21 |
|
|
22 |
source /etc/sysconfig/rc |
source /etc/conf.d/rc |
23 |
source $rc_functions |
source $rc_functions |
24 |
|
|
25 |
# mysql settings |
# mysql settings |
37 |
source /usr/lib/alxconfig-ng/functions/config_ssh_auth |
source /usr/lib/alxconfig-ng/functions/config_ssh_auth |
38 |
source /usr/lib/alxconfig-ng/functions/config_versions |
source /usr/lib/alxconfig-ng/functions/config_versions |
39 |
|
|
|
# check if mysql is available |
|
|
[ -x /usr/bin/mysql ] && MYSQL_ALX=true |
|
|
|
|
40 |
# other needed vars |
# other needed vars |
41 |
ALX_HW_DETECT=false |
ALX_HW_DETECT=false |
42 |
ALX_FORCED_RECHECK=false |
ALX_FORCED_RECHECK=false |
121 |
exit 1 |
exit 1 |
122 |
fi |
fi |
123 |
|
|
124 |
CUR_IP=$(/sbin/ifconfig ${ALX_IFACE} | sed -n '/addr:/s/ [^r]*..//gp') |
CUR_IP=$(ifconfig ${ALX_IFACE} | sed -n '/addr:/s/ [^r]*..//gp') |
125 |
CUR_MAC=$(/sbin/ifconfig ${ALX_IFACE} | grep HWaddr | cut -d ' ' -f11) |
CUR_MAC=$(ifconfig ${ALX_IFACE} | grep HWaddr | cut -d ' ' -f11) |
126 |
CUR_MTIME=$(date +%s) |
CUR_MTIME=$(date +%s) |
127 |
|
|
128 |
echo -e ${COLOREDSTAR} "Trying to validate my serial ..." |
echo -e ${COLOREDSTAR} "Trying to validate my serial ..." |
678 |
module=$(cat ${SETTINGSPATH}/modules) |
module=$(cat ${SETTINGSPATH}/modules) |
679 |
modprobe ${module} |
modprobe ${module} |
680 |
fi |
fi |
681 |
|
|
682 |
# check modprobe.conf |
# check modprobe.conf |
683 |
if [[ $(kernel_major_version) = 2.4 ]] |
if [[ $(kernel_major_version) = 2.4 ]] |
684 |
then |
then |
688 |
fi |
fi |
689 |
if [[ -z $(grep eth0 ${modulesconf}) ]] |
if [[ -z $(grep eth0 ${modulesconf}) ]] |
690 |
then |
then |
691 |
/sbin/modules-update force |
modules-update force |
692 |
fi |
fi |
693 |
else |
else |
694 |
# vars used by hwdetect |
# vars used by hwdetect |