Magellan Linux

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

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

revision 2778 by niro, Fri Aug 26 11:49:43 2011 UTC revision 3462 by niro, Fri Apr 13 17:17:59 2012 UTC
# Line 32  source ${ALX_FUNCTIONS}/serial_functions Line 32  source ${ALX_FUNCTIONS}/serial_functions
32  source ${ALX_FUNCTIONS}/config_modules  source ${ALX_FUNCTIONS}/config_modules
33  source ${ALX_FUNCTIONS}/config_plugins  source ${ALX_FUNCTIONS}/config_plugins
34  source ${ALX_FUNCTIONS}/config_network  source ${ALX_FUNCTIONS}/config_network
35  source ${ALX_FUNCTIONS}/usr/lib/alxconfig-ng/functions/config_printers  source ${ALX_FUNCTIONS}/config_printers
36  source ${ALX_FUNCTIONS}/usr/lib/alxconfig-ng/functions/config_sessions  source ${ALX_FUNCTIONS}/config_sessions
37  source ${ALX_FUNCTIONS}/usr/lib/alxconfig-ng/functions/config_x11  source ${ALX_FUNCTIONS}/config_x11
38  source ${ALX_FUNCTIONS}/usr/lib/alxconfig-ng/functions/config_auth  source ${ALX_FUNCTIONS}/config_auth
39  source ${ALX_FUNCTIONS}/usr/lib/alxconfig-ng/functions/config_ssh_auth  source ${ALX_FUNCTIONS}/config_ssh_auth
40  source ${ALX_FUNCTIONS}/usr/lib/alxconfig-ng/functions/config_versions  source ${ALX_FUNCTIONS}/config_versions
41    
42  # other needed vars  # other needed vars
43  ALX_HW_DETECT=false  ALX_HW_DETECT=false
# Line 778  preliminary_network() Line 778  preliminary_network()
778  reset_system_settings()  reset_system_settings()
779  {  {
780   # force load of de kbdkeys   # force load of de kbdkeys
781   loadkeys -q de   [ -x /usr/bin/loadkeys ] && loadkeys -q de
782     [ -x /sbin/loadkmap ] && loadkmap < /usr/share/busybox/keymaps/de.kmap
783   rc_echo   rc_echo
784   rc_echo -en ${COLRED}   rc_echo -en "${COLRED}"
785   rc_echo -n "*** Warning: you are about to reset *all* local settings on this system!"   rc_echo -n '--- Warning: you are about to reset *all* local settings on this system!'
786   rc_echo -e ${COLDEFAULT}   rc_echo -e "${COLDEFAULT}"
787   rc_echo "*** Do you really want to continue ?"   rc_echo '--- Do you really want to continue ?'
788   rc_echo -n "*** Enter 'yes' to continue, anything else to abort: "   rc_echo -n '--- Enter 'yes' to continue, anything else to abort: '
789   read kbinsert   read kbinsert
790   if [[ ${kbinsert} = yes ]]   if [[ ${kbinsert} = yes ]]
791   then   then
792   rc_echo -en ${COLRED}   rc_echo -en "${COLRED}"
793   rc_echo -n "*** OK, you really want it ... killing all settings: "   rc_echo -n '--- OK, you really want it ... killing all settings: '
794   for i in 3 2 1 now   for i in 3 2 1 now
795   do   do
796   rc_echo -n " ${i}"   rc_echo -n " ${i}"
797   sleep 1   sleep 1
798   done   done
799   rc_echo -e ${COLDEFAULT}   rc_echo -e "${COLDEFAULT}"
800    
801   ## reset all settings:   ## reset all settings:
802   rm -rf ${SETTINGSPATH}/*   rm -rf ${SETTINGSPATH}
803   rm -f /etc/alxconfig-ng/serial   rm -f /etc/alxconfig-ng/serial
804   rm -rf /etc/alxconfig-ng/state   rm -rf /etc/alxconfig-ng/state
805    
# Line 807  reset_system_settings() Line 808  reset_system_settings()
808    
809   # remove lprng   # remove lprng
810   rc-config del lprng &> /dev/null   rc-config del lprng &> /dev/null
811     rc-config del nmbd &> /dev/null
812    
813   # remove all user settings   # remove all user settings
814   [ -d ${ALX_UNPRIV_HOME} ] && rm -rf ${ALX_UNPRIV_HOME}   [ -d ${ALX_UNPRIV_HOME} ] && rm -rf ${ALX_UNPRIV_HOME}
815     install -o ${ALX_UNPRIV_USER} -g ${ALX_UNPRIV_GROUP} -d ${ALX_UNPRIV_HOME}
816    
817   # remove all ica-sessions   # remove all ica-sessions
818   find ${ALX_ICA_SESSIONS} -type f -name '*.ica' | xargs rm   find ${ALX_ICA_SESSIONS} -type f -name '*.ica' | xargs --no-run-if-empty rm
819    
820   # remove all old nics and modules configs   # remove all old nics and modules configs
821   find /etc/conf.d -type f -name 'net.*' | xargs rm   find /etc/conf.d -type f -name 'net.*' | xargs --no-run-if-empty rm
822   find /etc/modprobe.d -type f -name 'net.*' | xargs rm   find /etc/modprobe.d -type f -name 'net.*' | xargs --no-run-if-empty rm
823    
824   # restore default networking   # restore default networking
825   cat ${ALX_SKELETONS}/net/net.eth0 > /etc/conf.d/net.eth0   cat ${ALX_SKELETONS}/net/net.eth0 > /etc/conf.d/net.eth0
826     echo "${ALX_DEFAULT_HOSTNAME}" > /etc/hostname
827    
828   rc_echo "I am done now, press [Enter] to reboot system ..."   rc_echo "I am done now, press [Enter] to reboot system ..."
829   else   else

Legend:
Removed from v.2778  
changed lines
  Added in v.3462