Magellan Linux

Diff of /alx-src/branches/alxconf-060/init.d/alxsettings

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

alx-src/trunk/alxconfig-ng/init.d/alxsettings revision 350 by niro, Sun Oct 9 23:20:17 2005 UTC alx-src/branches/alxconf_20060908/init.d/alxsettings revision 1582 by niro, Tue Nov 23 12:24:14 2010 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.24 2005-10-09 23:20:17 niro Exp $  # $Header: /home/cvsd/alx-cvs/alx-src/alxconfig-ng/init.d/alxsettings,v 1.27 2005-10-11 12:10:15 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 37  source /usr/lib/alxconfig-ng/functions/c Line 37  source /usr/lib/alxconfig-ng/functions/c
37  source /usr/lib/alxconfig-ng/functions/config_x11  source /usr/lib/alxconfig-ng/functions/config_x11
38  source /usr/lib/alxconfig-ng/functions/config_auth  source /usr/lib/alxconfig-ng/functions/config_auth
39  source /usr/lib/alxconfig-ng/functions/config_ssh_auth  source /usr/lib/alxconfig-ng/functions/config_ssh_auth
40    source /usr/lib/alxconfig-ng/functions/config_versions
41    
42  # check if mysql is available  # check if mysql is available
43  [ -x /usr/bin/mysql ] && MYSQL_ALX=true  [ -x /usr/bin/mysql ] && MYSQL_ALX=true
# Line 93  update_system_settings() Line 94  update_system_settings()
94    
95   # exchange ssh rsa keys   # exchange ssh rsa keys
96   HOME=/root config_ssh_auth   HOME=/root config_ssh_auth
97    
98     # import version info
99     config_version
100  }  }
101    
102  get_system_serial()  get_system_serial()
# Line 377  import_settings_to_db() Line 381  import_settings_to_db()
381   module,   module,
382   resolution,   resolution,
383   depth,   depth,
384   monitorid   refresh_rate
385   )   )
386   values(   values(
387   '${ALX_SERIAL}',   '${ALX_SERIAL}',
388   '${XMODULE}',   '${XMODULE}',
389   '1024x768',   '1024x768',
390   '16',   '16',
391   '0'   '60'
392   );"; )   );"; )
393   evaluate_retval   evaluate_retval
394    
# Line 427  import_settings_to_db() Line 431  import_settings_to_db()
431   echo -e "      Screensaver settings ..."   echo -e "      Screensaver settings ..."
432   mysqldo "insert into cfg_screensaver(serial,screensaver) values('${ALX_SERIAL}','')"   mysqldo "insert into cfg_screensaver(serial,screensaver) values('${ALX_SERIAL}','')"
433    
434     # version info
435     local alx_os
436     local alx_utils
437     alx_os="$(< /etc/mageversion)"
438     alx_utils="$(magequery -n alxconfig-ng-alx | sed 's:.*\[\ \(.*\)\ \].*:\1:')"
439     alx_utils="${alx_utils/alxconfig-ng-alx-}"
440     mysqldo "insert into client_version(serial,os,utils) values('${ALX_SERIAL}','${alx_os}','${alx_utils}')"
441    
442   evaluate_retval   evaluate_retval
443  }  }
444    
# Line 509  update_settings_in_db() Line 521  update_settings_in_db()
521   module='${XMODULE}',   module='${XMODULE}',
522   resolution='1024x768',   resolution='1024x768',
523   depth='16',   depth='16',
524   monitorid='0'   refresh_rate='60'
525   where serial=${ALX_SERIAL};"   where serial=${ALX_SERIAL};"
526   evaluate_retval   evaluate_retval
527    
# Line 517  update_settings_in_db() Line 529  update_settings_in_db()
529   echo -e "      Input settings ..."   echo -e "      Input settings ..."
530   mysqldo "update cfg_input set mouse='${XMOUSETYPE}' where serial=${ALX_SERIAL};"   mysqldo "update cfg_input set mouse='${XMOUSETYPE}' where serial=${ALX_SERIAL};"
531   evaluate_retval   evaluate_retval
532    
533     # version info
534     local alx_os
535     local alx_utils
536     alx_os="$(< /etc/mageversion)"
537     alx_utils="$(magequery -n alxconfig-ng-alx | sed 's:.*\[\ \(.*\)\ \].*:\1:')"
538     alx_utils="${alx_utils/alxconfig-ng-alx-}"
539     mysqldo "update client_version set os='${alx_os}', utils='${alx_utils}' where serial=${ALX_SERIAL};"
540  }  }
541    
542  # imports current settings to the local system resolved by the hardware detection  # imports current settings to the local system resolved by the hardware detection
# Line 629  import_settings_local() Line 649  import_settings_local()
649   --icon-width "1" \   --icon-width "1" \
650   --icon-height "1"   --icon-height "1"
651    
652     # create a xinitrc
653     echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc
654    
655   # set correct permissions   # set correct permissions
656   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}
657   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox
658   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox
659   chmod 0755 ${ALX_UNPRIV_HOME}/.xtdesktop   chmod 0755 ${ALX_UNPRIV_HOME}/.xtdesktop
660   chmod 0644 ${ALX_UNPRIV_HOME}/.xtdeskrc   chmod 0644 ${ALX_UNPRIV_HOME}/.xtdeskrc
661     chmod 0644 ${ALX_UNPRIV_HOME}/.xinitrc
662  }  }
663    
664  # start|stop  # start|stop
# Line 740  reset_system_settings() Line 764  reset_system_settings()
764   rm -f /etc/alxconfig-ng/serial   rm -f /etc/alxconfig-ng/serial
765   rm -rf /etc/alxconfig-ng/state   rm -rf /etc/alxconfig-ng/state
766    
767     # clear all printers & net-shares
768     :> /etc/cups/printers.conf
769     :> /etc/samba/smb.conf
770    
771     # remove inetd, cups & smb from init
772     rc-config del inetd &> /dev/null
773     rc-config del cups &> /dev/null
774     rc-config del samba &> /dev/null
775    
776     # remove all user settings
777     [ -d ${ALX_UNPRIV_HOME} ] && rm -rf ${ALX_UNPRIV_HOME}
778    
779     # remove all ica-sessions
780     find ${ALX_ICA_SESSIONS} -type f -name '*.ica' | xargs rm
781    
782     # remove all old nics and modules configs
783     find /etc/conf.d -type f -name 'net.*' | xargs rm
784     find /etc/modules.d -type f -name 'net.*' | xargs rm
785    
786     # restore default networking
787     cat ${ALX_SKELETONS}/net/net.eth0 > /etc/conf.d/net.eth0
788    
789   echo "I am done now, press [Enter] to reboot system ..."   echo "I am done now, press [Enter] to reboot system ..."
790   else   else
791   echo "Aborted, press [Enter] to reboot system ..."   echo "Aborted, press [Enter] to reboot system ..."

Legend:
Removed from v.350  
changed lines
  Added in v.1582