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 348 by niro, Sun Oct 9 21:38:14 2005 UTC alx-src/branches/alxconf_20060908/init.d/alxsettings revision 545 by niro, Wed Feb 4 20:07:30 2009 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.23 2005-10-09 21:38:14 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 97  update_system_settings() Line 97  update_system_settings()
97    
98  get_system_serial()  get_system_serial()
99  {  {
100   local CUR_IP CUR_MAC CUR_MTIME   local CUR_IP CUR_MAC CUR_MTIME ALX_IFACE
101    
102     if [[ ${ALX_CONFD_NETWORKING} = true ]]
103     then
104     ALX_IFACE="$(< ${SETTINGSPATH}/confd-networking)"
105     else
106     ALX_IFACE="eth0"
107     fi
108    
109   # check if serial file exists   # check if serial file exists
110   if [ -f /etc/alxconfig-ng/serial ] && [[ ${ALX_FORCED_RECHECK} = false ]]   if [ -f /etc/alxconfig-ng/serial ] && [[ ${ALX_FORCED_RECHECK} = false ]]
# Line 622  import_settings_local() Line 629  import_settings_local()
629   --icon-width "1" \   --icon-width "1" \
630   --icon-height "1"   --icon-height "1"
631    
632     # create a xinitrc
633     echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc
634    
635   # set correct permissions   # set correct permissions
636   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}
637   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox
638   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox
639   chmod 0755 ${ALX_UNPRIV_HOME}/.xtdesktop   chmod 0755 ${ALX_UNPRIV_HOME}/.xtdesktop
640   chmod 0644 ${ALX_UNPRIV_HOME}/.xtdeskrc   chmod 0644 ${ALX_UNPRIV_HOME}/.xtdeskrc
641     chmod 0644 ${ALX_UNPRIV_HOME}/.xinitrc
642  }  }
643    
644  # start|stop  # start|stop
# Line 733  reset_system_settings() Line 744  reset_system_settings()
744   rm -f /etc/alxconfig-ng/serial   rm -f /etc/alxconfig-ng/serial
745   rm -rf /etc/alxconfig-ng/state   rm -rf /etc/alxconfig-ng/state
746    
747     # clear all printers & net-shares
748     :> /etc/cups/printers.conf
749     :> /etc/samba/smb.conf
750    
751     # remove inetd, cups & smb from init
752     rc-config del inetd &> /dev/null
753     rc-config del cups &> /dev/null
754     rc-config del samba &> /dev/null
755    
756     # remove all user settings
757     [ -d ${ALX_UNPRIV_HOME} ] && rm -rf ${ALX_UNPRIV_HOME}
758    
759     # remove all ica-sessions
760     find ${ALX_ICA_SESSIONS} -type f -name '*.ica' | xargs rm
761    
762     # remove all old nics and modules configs
763     find /etc/conf.d -type f -name 'net.*' | xargs rm
764     find /etc/modules.d -type f -name 'net.*' | xargs rm
765    
766     # restore default networking
767     cat ${ALX_SKELETONS}/net/net.eth0 > /etc/conf.d/net.eth0
768    
769   echo "I am done now, press [Enter] to reboot system ..."   echo "I am done now, press [Enter] to reboot system ..."
770   else   else
771   echo "Aborted, press [Enter] to reboot system ..."   echo "Aborted, press [Enter] to reboot system ..."

Legend:
Removed from v.348  
changed lines
  Added in v.545