1 |
#!/bin/bash |
#!/bin/bash |
2 |
|
|
|
#startup seq: K01 Level {0,6} | S99 Level {3,4,5} |
|
|
|
|
3 |
#%rlevels: 3:s 4:s 5:s 0:k 6:k |
#%rlevels: 3:s 4:s 5:s 0:k 6:k |
4 |
#%start: 99 |
#%start: 99 |
5 |
#%stop: 01 |
#%stop: 01 |
9 |
#%before: |
#%before: |
10 |
#%after: |
#%after: |
11 |
|
|
12 |
|
# $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsetstate,v 1.5 2005-04-12 20:45:55 niro Exp $ |
13 |
|
|
14 |
source /etc/sysconfig/rc |
source /etc/sysconfig/rc |
15 |
source $rc_functions |
source $rc_functions |
16 |
|
|
17 |
#mysql settings |
#mysql settings |
18 |
source /etc/alx-config/config.rc |
source /etc/alxconfig-ng/config.rc |
19 |
source /opt/alx-config/functions/mysqlfunctions |
source /usr/lib/alxconfig-ng/functions/mysqlfunctions |
20 |
source /opt/alx-config/functions/alx-mysql-functions |
source /usr/lib/alxconfig-ng/functions/serial_functions |
21 |
|
|
22 |
#check if mysql is available |
#check if mysql is available |
23 |
[ -x /usr/bin/mysql ] && MYSQL_ALX=true |
[ -x /usr/bin/mysql ] && MYSQL_ALX=true |
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 |
124 |
########### starts here ################ |
########### starts here ################ |
125 |
|
|
126 |
#first of all get current system serial |
#first of all get current system serial |
127 |
if [ -f /etc/alx-config/serial ] |
if [ -f /etc/alxconfig-ng/serial ] |
128 |
then |
then |
129 |
source /etc/alx-config/serial |
source /etc/alxconfig-ng/serial |
130 |
else |
else |
131 |
ALX_SERIAL=0 |
ALX_SERIAL=0 |
132 |
fi |
fi |