Magellan Linux

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

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

revision 2153 by niro, Tue May 17 21:34:21 2011 UTC revision 2455 by niro, Mon Jun 27 12:47:52 2011 UTC
# Line 51  unset ALX_SERIAL ALX_STATE Line 51  unset ALX_SERIAL ALX_STATE
51  # setup needed directories  # setup needed directories
52  [ ! -d /etc/alxconfig-ng/state ] && install -d /etc/alxconfig-ng/state  [ ! -d /etc/alxconfig-ng/state ] && install -d /etc/alxconfig-ng/state
53    
   
 # read_cmdline ${item}  
 read_cmdline()  
 {  
  local i  
   
  for i in $(< /proc/cmdline)  
  do  
  [[ ${i} = $1 ]] && return 0  
  done  
   
  return 1  
 }  
   
54  update_system_settings()  update_system_settings()
55  {  {
56   rc_mecho Checking system setup ...   rc_mecho Checking system setup ...
# Line 609  import_settings_local() Line 595  import_settings_local()
595   # add a newline (maybe there is no crlf in the footer)   # add a newline (maybe there is no crlf in the footer)
596   echo >> ${ALX_UNPRIV_HOME}/.fluxbox/menu   echo >> ${ALX_UNPRIV_HOME}/.fluxbox/menu
597    
   
598   # setup some standart icons (sysinfo.lnk)   # setup some standart icons (sysinfo.lnk)
  # basic config  
  cat ${ALX_SKELETONS}/xtdesktop/xtdeskrc > ${ALX_UNPRIV_HOME}/.xtdeskrc  
   
599   # clean desktop icon location   # clean desktop icon location
600   [ -d ${ALX_UNPRIV_HOME}/.xtdesktop ] && rm -rf ${ALX_UNPRIV_HOME}/.xtdesktop   [ -d ${ALX_UNPRIV_HOME}/.idesktop ] && rm -rf ${ALX_UNPRIV_HOME}/.idesktop
601   install -d ${ALX_UNPRIV_HOME}/.xtdesktop   install -d ${ALX_UNPRIV_HOME}/.idesktop
602    
603   # last but not least gen a icon with some sys informations   # last but not least gen a icon with some sys informations
604   local sysinfo   local sysinfo
# Line 638  import_settings_local() Line 620  import_settings_local()
620   --name "${sysinfo}" \   --name "${sysinfo}" \
621   --command "exit 0" \   --command "exit 0" \
622   --icon "${ALX_SESSIONS_ICONS}/sysinfo.png" \   --icon "${ALX_SESSIONS_ICONS}/sysinfo.png" \
623   --dest "${ALX_UNPRIV_HOME}/.xtdesktop/sysinfo.lnk" \   --dest "${ALX_UNPRIV_HOME}/.idesktop/sysinfo.lnk" \
624   --xres "${xres}" \   --xres "${xres}" \
625   --yres "${yres}" \   --yres "${yres}" \
626   --icon-width "1" \   --icon-width "1" \
627   --icon-height "1"   --icon-height "1"
628    
  # create a xinitrc  
  echo "exec startfluxbox" > ${ALX_UNPRIV_HOME}/.xinitrc  
   
629   # set correct permissions   # set correct permissions
630   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}
631   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox   chown ${ALX_UNPRIV_USER}:${ALX_UNPRIV_GROUP} ${ALX_UNPRIV_HOME}/.fluxbox
632   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox   chmod 0755 ${ALX_UNPRIV_HOME}/.fluxbox
633   chmod 0755 ${ALX_UNPRIV_HOME}/.xtdesktop   chmod 0755 ${ALX_UNPRIV_HOME}/.idesktop
634   chmod 0644 ${ALX_UNPRIV_HOME}/.xtdeskrc   chmod 0644 ${ALX_UNPRIV_HOME}/.ideskrc
  chmod 0644 ${ALX_UNPRIV_HOME}/.xinitrc  
635  }  }
636    
637  # start|stop  # start|stop
# Line 686  preliminary_network() Line 664  preliminary_network()
664   # keeping like always safe:   # keeping like always safe:
665   # no network should be startet here,   # no network should be startet here,
666   # so we can delete all pid files if one exists   # so we can delete all pid files if one exists
667   if [[ ! -z $(pidof udhcpc) ]]   if [[ ! -z $(pidof $(basename ${ALX_DHCP_PROG})) ]]
668   then   then
669   rc_mecho "Forcing network down"   rc_mecho "Forcing network down"
670   killall udhcpc &> /dev/null   killall $(basename ${ALX_DHCP_PROG}) &> /dev/null
671   sleep 1   sleep 1
672   fi   fi
673   [[ ${ALX_CONFD_NETWORKING} = true ]] && ${rc_base}/init.d/network stop   [[ ${ALX_CONFD_NETWORKING} = true ]] && ${rc_base}/init.d/network stop
# Line 702  preliminary_network() Line 680  preliminary_network()
680   ${rc_base}/init.d/network start   ${rc_base}/init.d/network start
681   else   else
682   rc_print "Starting default dhcp based networking ... "   rc_print "Starting default dhcp based networking ... "
683   # -t 10 timeout of 10 secs   ${ALX_DHCP_PROG} ${ALX_DHCP_START} &> /dev/null
  udhcpc -t 10 &> /dev/null  
684   evaluate_retval   evaluate_retval
685   fi   fi
686   ;;   ;;
# Line 715  preliminary_network() Line 692  preliminary_network()
692   ${rc_base}/init.d/network stop   ${rc_base}/init.d/network stop
693   else   else
694   rc_print "Stopping default dhcp based networking ... "   rc_print "Stopping default dhcp based networking ... "
695   ifconfig eth0 down   ifconfig ${ALX_IFACE} down
696   fi   fi
697   if [[ ! -z $(pidof udhcpc) ]]   if [[ ! -z $(pidof $(basename ${ALX_DHCP_PROG})) ]]
698   then   then
699   killall udhcpc  &> /dev/null   killall $(basename ${ALX_DHCP_PROG}) &> /dev/null
700   sleep 1   sleep 1
701   fi   fi
702   evaluate_retval   evaluate_retval

Legend:
Removed from v.2153  
changed lines
  Added in v.2455