Magellan Linux

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

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

revision 490 by niro, Sun Jun 8 10:56:39 2008 UTC revision 510 by niro, Tue Jun 17 19:05:51 2008 UTC
# Line 11  Line 11 
11  #%before:  #%before:
12  #%after:  #%after:
13    
14  # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/init.d/alxsettings,v 1.15 2008-06-08 10:56:39 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/tinyalxconfig-ng/init.d/alxsettings,v 1.21 2008-06-17 19:05:51 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 21  Line 21 
21  # 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.
22  # the server settings has higher priority.  # the server settings has higher priority.
23    
24  source /etc/sysconfig/rc  source /etc/conf.d/rc
25  source $rc_functions  source ${rc_functions}
26    
27  # mysql settings  # mysql settings
28  source /etc/alxconfig-ng/config.rc  source /etc/alxconfig-ng/config.rc
# Line 374  import_settings_to_db() Line 374  import_settings_to_db()
374   echo "      Screensaver settings ..."   echo "      Screensaver settings ..."
375   mysqldo "insert into cfg_screensaver(serial,screensaver) values('${ALX_SERIAL}','')"   mysqldo "insert into cfg_screensaver(serial,screensaver) values('${ALX_SERIAL}','')"
376    
377     # theme
378     echo "      Theme settings ..."
379     mysqldo "insert into cfg_theme(serial,theme) values('${ALX_SERIAL}','${ALX_DEFAULT_THEME}')"
380    
381   evaluate_retval   evaluate_retval
382  }  }
383    
# Line 477  import_settings_local() Line 481  import_settings_local()
481    
482   # now generate fluxbox config files   # now generate fluxbox config files
483    
484     # fluxbox theme
485     [[ ! -d /usr/share/fluxbox/styles ]] && install -d /usr/share/fluxbox/styles
486     cat ${ALX_SKELETONS}/fluxbox/themes/${ALX_DEFAULT_THEME} > /usr/share/fluxbox/styles/default
487    
488   # fluxbox main config   # fluxbox main config
489   cat ${ALX_SKELETONS}/fluxbox/init > ${ALX_UNPRIV_HOME}/.fluxbox/init   cat ${ALX_SKELETONS}/fluxbox/init > ${ALX_UNPRIV_HOME}/.fluxbox/init
490    
# Line 501  import_settings_local() Line 509  import_settings_local()
509    
510   # setup some standart icons (sysinfo.lnk)   # setup some standart icons (sysinfo.lnk)
511   # basic config   # basic config
512   cat ${ALX_SKELETONS}/xtdesktop/xtdeskrc > ${ALX_UNPRIV_HOME}/.xtdeskrc   cat ${ALX_SKELETONS}/xtdesktop/xtdeskrc-${ALX_DEFAULT_THEME} > ${ALX_UNPRIV_HOME}/.xtdeskrc
513    
514   # clean desktop icon location   # clean desktop icon location
515   [ -d ${ALX_UNPRIV_HOME}/.xtdesktop ] && rm -rf ${ALX_UNPRIV_HOME}/.xtdesktop   [ -d ${ALX_UNPRIV_HOME}/.xtdesktop ] && rm -rf ${ALX_UNPRIV_HOME}/.xtdesktop
# Line 533  import_settings_local() Line 541  import_settings_local()
541   --icon-width "1" \   --icon-width "1" \
542   --icon-height "1"   --icon-height "1"
543    
  # create a xinitrc  
  echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc  
   
544   # set correct permissions   # set correct permissions
545   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}
546   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox
# Line 597  reset_system_settings() Line 602  reset_system_settings()
602   rm -f /etc/alxconfig-ng/serial   rm -f /etc/alxconfig-ng/serial
603   rm -rf /etc/alxconfig-ng/state   rm -rf /etc/alxconfig-ng/state
604    
605   # clear all printers & net-shares   # clear all printers
606   :> /etc/cups/printers.conf   :> /etc/printcap
607   :> /etc/samba/smb.conf   find /var/spool/lpd/* -type d | xargs rm -rf &> /dev/null
   
  # remove inetd, cups & smb from init  
  rc-config del inetd &> /dev/null  
  rc-config del cups &> /dev/null  
  rc-config del samba &> /dev/null  
608    
609   # remove all user settings   # remove all user settings
610   [ -d ${ALX_UNPRIV_HOME} ] && rm -rf ${ALX_UNPRIV_HOME}   [ -d ${ALX_UNPRIV_HOME} ] && rm -rf ${ALX_UNPRIV_HOME}

Legend:
Removed from v.490  
changed lines
  Added in v.510