9 |
#%before: |
#%before: |
10 |
#%after: |
#%after: |
11 |
|
|
12 |
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsetstate,v 1.3 2005-03-09 00:04:18 niro Exp $ |
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsetstate,v 1.6 2005-05-11 12:25:39 niro Exp $ |
13 |
|
|
14 |
source /etc/sysconfig/rc |
source /etc/sysconfig/rc |
15 |
source $rc_functions |
source $rc_functions |
29 |
unset ALX_SERIAL ALX_STATE |
unset ALX_SERIAL ALX_STATE |
30 |
|
|
31 |
#get current system state |
#get current system state |
32 |
if [ -f /etc/alx-config/state/state ] |
if [ -f /etc/alxconfig-ng/state/state ] |
33 |
then |
then |
34 |
source /etc/alx-config/state/state |
source /etc/alxconfig-ng/state/state |
35 |
else |
else |
36 |
ALX_STATE=error |
ALX_STATE=error |
37 |
fi |
fi |
113 |
# nice name is alx_connected_state or sth like this |
# nice name is alx_connected_state or sth like this |
114 |
unset_alx_connected(){ |
unset_alx_connected(){ |
115 |
local SQL_OPTS |
local SQL_OPTS |
116 |
|
local CUR_MAC |
117 |
|
|
118 |
|
CUR_MAC=$(/sbin/ifconfig eth0 | grep HWaddr | cut -d ' ' -f11) |
119 |
|
|
120 |
echo -e ${COLMAGENTA}"Unregister system from database"${COLDEFAULT} |
echo -e ${COLMAGENTA}"Unregister system from database"${COLDEFAULT} |
121 |
|
|
127 |
########### starts here ################ |
########### starts here ################ |
128 |
|
|
129 |
#first of all get current system serial |
#first of all get current system serial |
130 |
if [ -f /etc/alx-config/serial ] |
if [ -f /etc/alxconfig-ng/serial ] |
131 |
then |
then |
132 |
source /etc/alx-config/serial |
source /etc/alxconfig-ng/serial |
133 |
else |
else |
134 |
ALX_SERIAL=0 |
ALX_SERIAL=0 |
135 |
fi |
fi |
147 |
*) |
*) |
148 |
echo "Usage: $0 {start|stop} ..." |
echo "Usage: $0 {start|stop} ..." |
149 |
;; |
;; |
|
esac |
|
150 |
|
esac |