Magellan Linux

Diff of /alx-src/trunk/alxconfig-ng/init.d/alxsettings

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 248 by niro, Wed Apr 13 16:15:28 2005 UTC revision 252 by niro, Thu Apr 14 19:12:21 2005 UTC
# Line 11  Line 11 
11  #%before:  #%before:
12  #%after:  #%after:
13    
14  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsettings,v 1.8 2005-04-13 16:15:28 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsettings,v 1.9 2005-04-14 19:12:21 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
# Line 33  source /usr/lib/alxconfig-ng/functions/c Line 33  source /usr/lib/alxconfig-ng/functions/c
33  source /usr/lib/alxconfig-ng/functions/config_sessions  source /usr/lib/alxconfig-ng/functions/config_sessions
34  source /usr/lib/alxconfig-ng/functions/config_x11  source /usr/lib/alxconfig-ng/functions/config_x11
35  source /usr/lib/alxconfig-ng/functions/config_auth  source /usr/lib/alxconfig-ng/functions/config_auth
36    source /usr/lib/alxconfig-ng/functions/config_ssh_auth
37    
38  #check if mysql is available  #check if mysql is available
39  [ -x /usr/bin/mysql ] && MYSQL_ALX=true  [ -x /usr/bin/mysql ] && MYSQL_ALX=true
# Line 65  update_system_settings(){ Line 66  update_system_settings(){
66    
67   # imports auth settings from db   # imports auth settings from db
68   config_auth   config_auth
69    
70     # exchange ssh rsa keys
71     config_ssh_auth
72  }  }
73    
74  get_system_serial(){  get_system_serial(){
# Line 245  import_settings_to_db() { Line 249  import_settings_to_db() {
249   '1024x768',   '1024x768',
250   '16',   '16',
251   '0'   '0'
252   );";   );"; )
253     evaluate_retval
254    
255   # input   # input
256    mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \   echo -e "      Input settings ..."
257   "insert into cfg_input(serial,mouse) values('${ALX_SERIAL}','${XMOUSETYPE}');";)   mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \
258     "insert into cfg_input(serial,mouse) values('${ALX_SERIAL}','${XMOUSETYPE}');"
259     evaluate_retval
260    
261     # auth
262     echo -e "      Authentifcation settings ..."
263     mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \
264     "insert into client_auth(
265     serial,
266     username,
267     shell,
268     vnc,
269     samba,
270     station
271     )
272     values(
273     '${ALX_SERIAL}',
274     '${ALX_UNPRIV_USER}',
275     '',
276     '',
277     '',
278     ''
279     );"
280     evaluate_retval
281    
282     # input
283     echo -e "      Autostart settings ..."
284     mysql_command ${SQL_USER} ${SQL_PASS} ${SQL_HOST} ${SQL_DB} \
285     "insert into cfg_autostart(serial,session) values('${ALX_SERIAL}','');"
286   evaluate_retval   evaluate_retval
287  }  }
288    
# Line 280  import_settings_local(){ Line 313  import_settings_local(){
313    
314   #set system state to 'already configured'   #set system state to 'already configured'
315   touch /etc/alxconfig-ng/state/configured   touch /etc/alxconfig-ng/state/configured
316    
317     # default passwords are bad
318     #usermod -p $(perl -e "printf(crypt('foobar','AD'))") root
319     #usermod -p $(perl -e "printf(crypt('foobar','AD'))") ${ALX_UNPRIV_USER}
320     #smbpasswd -a root foobar
321  }  }
322    
323  #start|stop  #start|stop
# Line 352  case $1 in Line 390  case $1 in
390   then   then
391   import_settings_to_db   import_settings_to_db
392   import_settings_local   import_settings_local
393    
394     # here we should also exchange the ssh keys
395     # or the system cannot be rebooted after
396     # the first start via the alx-webadmin
397     config_ssh_auth
398   fi   fi
399    
400   #now setup system configuration   #now setup system configuration
401   #alx_setup_or_whatever_it_will_be_called()   #alx_setup_or_whatever_it_will_be_called()
402   [ "${ALX_HW_DETECT}" == "false" ] && update_system_settings   [ "${ALX_HW_DETECT}" == "false" ] && update_system_settings
# Line 372  case $1 in Line 415  case $1 in
415   echo "Usage: $0 {start|stop} ..."   echo "Usage: $0 {start|stop} ..."
416   ;;   ;;
417  esac  esac
418    

Legend:
Removed from v.248  
changed lines
  Added in v.252