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 359 by niro, Mon Oct 10 21:19:08 2005 UTC alx-src/branches/alxconf_20060908/init.d/alxsettings revision 1616 by niro, Mon Dec 6 09:18:06 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.26 2005-10-10 21:19:08 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 139  get_system_serial() Line 143  get_system_serial()
143   else   else
144   # abort on non valid serial   # abort on non valid serial
145   ALX_STATE="invalid serial"   ALX_STATE="invalid serial"
146   echo "ALX_STATE=${ALX_STATE}" > /etc/alxconfig-ng/state/state   echo "ALX_STATE=\"${ALX_STATE}\"" > /etc/alxconfig-ng/state/state
147   show_invalid_serial_msg   show_invalid_serial_msg
148   exit 1   exit 1
149   fi   fi
# Line 205  get_system_serial() Line 209  get_system_serial()
209   fi   fi
210    
211   # write current state to temp file   # write current state to temp file
212   echo "ALX_STATE=${ALX_STATE}" > /etc/alxconfig-ng/state/state   echo "ALX_STATE=\"${ALX_STATE}\"" > /etc/alxconfig-ng/state/state
213   [ -f /hardware-auto-detection ] && rm /hardware-auto-detection   [ -f /hardware-auto-detection ] && rm /hardware-auto-detection
214    
215   # now export ALX_FORCED_RECHECK=true   # now export ALX_FORCED_RECHECK=true
# Line 230  get_system_serial() Line 234  get_system_serial()
234   # set ALX_STATE to ok so everybody knows that everything was ok   # set ALX_STATE to ok so everybody knows that everything was ok
235   ALX_STATE=ok   ALX_STATE=ok
236    
237   echo "ALX_SERIAL=${ALX_SERIAL}" > /etc/alxconfig-ng/serial   echo "ALX_SERIAL=\"${ALX_SERIAL}\"" > /etc/alxconfig-ng/serial
238   echo "ALX_REG_DATE=${CUR_MTIME}" >> /etc/alxconfig-ng/serial   echo "ALX_REG_DATE=\"${CUR_MTIME}\"" >> /etc/alxconfig-ng/serial
239    
240   evaluate_retval   evaluate_retval
241   else   else
# Line 250  get_system_serial() Line 254  get_system_serial()
254   fi   fi
255    
256   # write current state to temp file   # write current state to temp file
257   echo "ALX_STATE=${ALX_STATE}" > /etc/alxconfig-ng/state/state   echo "ALX_STATE=\"${ALX_STATE}\"" > /etc/alxconfig-ng/state/state
258   echo "ALX_IFACE=${ALX_IFACE}" >> /etc/alxconfig-ng/state/state   echo "ALX_IFACE=\"${ALX_IFACE}\"" >> /etc/alxconfig-ng/state/state
259  }  }
260    
261    
# 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 703  preliminary_network() Line 727  preliminary_network()
727   if ps -A|grep dhcpcd > /dev/null   if ps -A|grep dhcpcd > /dev/null
728   then   then
729   dhcpcd -z  &> /dev/null   dhcpcd -z  &> /dev/null
730     sleep 1
731   fi   fi
732   evaluate_retval   evaluate_retval
733   ;;   ;;

Legend:
Removed from v.359  
changed lines
  Added in v.1616