Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eth0 startet nicht beim boot
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
leo2k
Apprentice
Apprentice


Joined: 28 Mar 2005
Posts: 223
Location: karlsruhe

PostPosted: Wed Jun 08, 2005 9:13 am    Post subject: eth0 startet nicht beim boot Reply with quote

servus jungs,

seit ner weile habe ich das problem dass beim boot eth0 nicht gestartet wird.

ich habe das net.eth0 init script per rc-update auf dem default level.
aber trotzdem wird die karte nicht gestartet.

helft mir mal dabei. :)


leo
_________________
meine hp ölrechner.de
Back to top
View user's profile Send private message
psyqil
Advocate
Advocate


Joined: 26 May 2003
Posts: 2767

PostPosted: Wed Jun 08, 2005 9:26 am    Post subject: Reply with quote

Ist da nicht alle 100.000 Pakete ein Ölwechsel nötig? :twisted: SCNR...
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Wed Jun 08, 2005 9:32 am    Post subject: Re: eth0 startet nicht beim boot Reply with quote

leo2k wrote:
seit ner weile habe ich das problem dass beim boot eth0 nicht gestartet wird.

Sowas würde auch passieren wenn die Karte gar nicht "da" wäre (nehme ich mal an).
Taucht die Karte denn in dmesg auf und/oder hilft ein manueller Start von net.eth0?

EDIT: Ölwechseln bringt dann was wenn die Pommes aus dem PC ranzig schmecken ;-)
Back to top
View user's profile Send private message
sebastianm
n00b
n00b


Joined: 06 Jun 2005
Posts: 16
Location: Germany, Moenchengladbach

PostPosted: Wed Jun 08, 2005 11:29 am    Post subject: Reply with quote

Ein Wenig was an Output, z.B. von dmesg wäre nicht schlecht. Taucht die Karte normal in ifconfig auf? Läßt sie sich mit "dhcpcd eth0" oder "ipconfig eth0 IP up" starten?

BTW: Man kann seinen PC durchaus in Öl kühlen, da das elektrisch nicht leitet, allerdings lassen sich Pommes in kaltem Öl so schlecht frittieren :wink:

edit: @Anarcho unter mir (um nicht zuviele OT Posts zu erstellen):
Sag bescheid wie die Pommes damit werden! Aber um die Temperatur zu erreichen muss der Rechner auch was zu tun haben, es wird als ein neues Paket benötigt, z.B. "emerge pommes"


Last edited by sebastianm on Wed Jun 08, 2005 12:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
Anarcho
Advocate
Advocate


Joined: 06 Jun 2004
Posts: 2970
Location: Germany

PostPosted: Wed Jun 08, 2005 11:45 am    Post subject: Reply with quote

Wie wäre es denn mit einem kleinen Becken Öl über nem Dual-Athlon-TBird? Der schafft doch gute 80°
_________________
...it's only Rock'n'Roll, but I like it!
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Wed Jun 08, 2005 12:19 pm    Post subject: Reply with quote

Evtl. Kernel neu übersetzt und Kartentreiber nun als Modul kompiliert ?
Back to top
View user's profile Send private message
leo2k
Apprentice
Apprentice


Joined: 28 Mar 2005
Posts: 223
Location: karlsruhe

PostPosted: Wed Jun 08, 2005 1:31 pm    Post subject: Reply with quote

hi,
also können wir den ölrechner hier bitte aus dem spiel lassen! :)

ich kann die karte problemlos über
Code:
ifconfig eth0 up
starten. und dann per
Code:
dhcpcd eth0
eine ip besorgen. nach dieser prozedur nach jedem reboot läuft alles prima.

leo
_________________
meine hp ölrechner.de
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3943
Location: Hamburg

PostPosted: Wed Jun 08, 2005 1:39 pm    Post subject: Reply with quote

Längere Antwortzeit für dhcp einstellen in /etc/conf.d/net ? Evtl. braucht der dhcp - Server auch länger und/oder dein Rechner schafft das nicht im vorgegebenen Zeitintervall während des Bootvorgangs.
Back to top
View user's profile Send private message
leo2k
Apprentice
Apprentice


Joined: 28 Mar 2005
Posts: 223
Location: karlsruhe

PostPosted: Wed Jun 08, 2005 1:52 pm    Post subject: Reply with quote

hmm...das problem liegt ja eher daran dass die karte garnich gestartet wird.
ich vermute da was beim init-script, welches so aussieht:
Code:
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/net.lo,v 1.10 2004/04/21 17:09:18 vapier Exp $

start() {
        ebegin "Bringing ${IFACE} up"
        /sbin/ifconfig lo 127.0.0.1 up 2>/dev/null
        /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 \
                gw 127.0.0.1 dev lo 2> /dev/null
        eend 0
}

stop() {
        ebegin "Bringing ${IFACE} down"
        /sbin/ifconfig ${IFACE} down &>/dev/null
        eend 0
}

naja, vll fällt ja jemand was auf.
ansonsten kann ich nur sagen dass der samba-server beim versuch zu starten, die services gleich wieder stoppt. ich denke das liegt aber auch daran dass kein net.interface zu dem zeitpunkt läuft.

leo
_________________
meine hp ölrechner.de
Back to top
View user's profile Send private message
sokar2000
Tux's lil' helper
Tux's lil' helper


Joined: 17 Feb 2005
Posts: 137
Location: Zu Hause

PostPosted: Wed Jun 08, 2005 2:20 pm    Post subject: Reply with quote

Hmmm. Sieht so aus, als wenn er nur lo starten würde. probier mal:

Code:
#!/sbin/runscript
if [[ -n ${NET_DEBUG} ]]; then
   set -x
   devnull=/dev/stderr
else
   devnull=/dev/null
fi
depend() {
   use coldplug hotplug pcmcia usb isdn4linux wlan
   local iface=${myservice##*.}
   [[ $( type -t depend_${iface} ) == "function" ]] && depend_${iface}
}
MODULES_DIR=/lib/rcscripts/net.modules.d
source ${MODULES_DIR}/helpers.d/functions
after() {
   local x="$*"
   [[ $# -gt 1 ]] && x=$( echo -e "${x// /\n}" | sort | xargs )
   eval "${MODULE}_after() { echo \"$x\"; }"
}
before() {
   local x="$*"
   [[ $# -gt 1 ]] && x=$( echo -e "${x// /\n}" | sort | xargs )
   eval "${MODULE}_before() { echo \"$x\"; }"
}
need() {
   local x="$*"
   [[ $# -gt 1 ]] && x=$( echo -e "${x// /\n}" | sort | xargs )
   eval "${MODULE}_need() { echo \"$x\"; }"
}
installed() {
   local x="$*"
   [[ $# -gt 1 ]] && x=$( echo -e "${x// /\n}" | sort | xargs )
   eval "${MODULE}_instlled() { echo \"$x\"; }"
}

sort() {
   LC_ALL=C /bin/sort "$@"
}
module_class_wrap() {
   local module=${1} provides=${2} x
   [[ $( type -t ${provides}_provides ) == function ]] && return
   for x in $( typeset -f | grep -o ^${module}_'[^ ]*' ); do
      eval "${provides}${x#${module}}() { ${x} \"\$@\"; }"
   done
}
module_load_minimum() {
   local f=${1} MODULE=${1##*/}
   if [[ ! -f ${f} ]]; then
      eerror "${f} does not exist"
      return 1
   fi

   if ! source ${f} ; then
      eerror "${MODULE} failed a sanity check"
      return 1
   fi

   for f in check_installed provides check_depends depend; do
      [[ $( type -t ${MODULE}_${f} ) == function ]] && continue
      eerror "${MODULE} does not support the required function ${f}"
      return 1
   done
   ${MODULE}_depend

   return 0
}
modules_load_auto() {
   local e f i j beforefuncs afterfuncs diffs unload
   MODULES=( $( find ${MODULES_DIR}/ -maxdepth 1 -type f ! -name ".*" | sort ) )
   beforefuncs="$( typeset -F )"
   j=${#MODULES[@]}
   loaded_interface=false
   for (( i=0; i<j; i++ )); do
      unload=false
      module_load_minimum ${MODULES[i]} || unload=true
      MODULES[i]=${MODULES[i]##*/}
      ! ${unload} && ${MODULES[i]}_check_installed false || unload=true
      if [[ ${MODULES[i]} == interface ]]; then
         eerror "interface is a reserved name - cannot load a module called interface"
         return 1
      fi
      afterfuncs="$( typeset -F )"
      if ${unload} ; then
         unset MODULES[i]
         unsetfuncs="${unsetfuncs} $( diff -U0 <( echo "${beforefuncs}" ) <( echo "${afterfuncs}" ) 2>/dev/null \
            | awk 'BEGIN { ORS = " "; } /+declare -f/ { print $3; }' )"
      fi
      beforefuncs="${afterfuncs}"
   done
   MODULES=( "${MODULES[@]}" )
   return 0
}
modules_check_installed() {
   local i j missingdeps nmods=${#MODULES[@]}

   for (( i=0; i<nmods; i++ )); do
      [[ $( type -t ${MODULES[i]}_instlled ) != function ]] && continue
      for j in $( ${MODULES[i]}_instlled ); do
         missingdeps=true
         if [[ $( type -t ${j}_check_installed ) == function ]]; then
            ${j}_check_installed && missingdeps=false
         fi
         ${missingdeps} && unset MODULES[i] && unset PROVIDES[i] && break
      done
   done
   MODULES=( "${MODULES[@]}" )
   PROVIDES=( "${PROVIDES[@]}" )
}
modules_check_user() {
   local -a umods
   local i j k l npref nmods=${#MODULES[@]}
   eval umods=( \"\$\{modules_${iface}\[@\]\}\" )
   umods=( "${umods[@]}" "${modules[@]}" )
   npref=3
   umods=( "${umods[@]}" "ifconfig" "dhcpcd" "iwconfig" )
   for (( i=0; i<${#umods[@]}; i++ )); do
      [[ ${umods[i]} == dhcp ]] && continue
      if [[ ${umods[i]} == !* ]]; then
         for (( j=0; j<nmods; j++ )); do
            [[ -z ${MODULES[j]} ]] && continue
            if [[ ${umods[i]:1} == ${MODULES[j]} || ${umods[i]:1} == ${PROVIDES[j]} ]]; then
               ${MODULES[j]}_check_installed && module_class_wrap ${MODULES[j]}
               unset MODULES[j]
               unset PROVIDES[j]
               break
            fi
         done
         continue
      fi
      if [[ $( type -t ${umods[i]}_provides ) != function ]]; then
         (( i < ${#umods[@]} - npref )) || continue
         eerror "${umods[i]} is not a valid module (missing provides)"
         return 1
      fi
      if (( i < ${#umods[@]} - npref )); then
         ${umods[i]}_check_installed true || return 1
      else
         ${umods[i]}_check_installed false || continue
      fi
      mod=$( ${umods[i]}_provides )
      for (( j=0; j<nmods; j++ )); do
         [[ -z ${MODULES[j]} ]] && continue
         if [[ ${PROVIDES[j]} == ${mod} && ${umods[i]} != ${MODULES[j]} ]]; then
            for (( l=0; l<nmods; l++ )); do
               [[ ${l} -eq ${j} || -z ${MODULES[l]} ]] && continue
               if [[ ${PROVIDES[l]} == ${mod} ]]; then
                  unset MODULES[j]
                  unset PROVIDES[j]
                  break
               fi
            done
         fi
      done
   done
   for (( i=0; i<nmods-1; i++ )); do
      [[ -z ${MODULES[i]} ]] && continue         
      for (( j=i+1; j<nmods; j++)); do
         [[ -z ${MODULES[j]} ]] && continue
         [[ ${PROVIDES[i]} == ${PROVIDES[j]} ]] && unset MODULES[j] && unset PROVIDES[j]
      done
   done
   MODULES=( "${MODULES[@]}" )
   PROVIDES=( "${PROVIDES[@]}" )
   return 0
}
modules_sort() {
   local -a modnums sort_history modafter modbefore
   local i j k p changed_something nmods=${#MODULES[@]}
   modnums=()
   for (( i=0; i<nmods; i++ )); do
      modnums[i]=${i}
      [[ $( type -t ${MODULES[i]}_after ) == function ]] && modafter[i]=$( ${MODULES[i]}_after )
      [[ $( type -t ${MODULES[i]}_before ) == function ]] && modbefore[i]=$( ${MODULES[i]}_before )
   done
   sort_history[0]="${modnums[*]}"
   for (( k=1; 1; k++ )); do
      changed_something=false
      for (( i=0; i<nmods; i++ )); do
         for p in ${modafter[i]}; do
            for (( j=0; j<nmods; j++ )); do
               [[ ${p} != ${MODULES[j]} && ${p} != ${PROVIDES[j]} ]] && continue
               if [[ ${modnums[i]} -lt ${modnums[j]} ]]; then
                  tmp=${modnums[i]}
                  modnums[i]=${modnums[j]}
                  modnums[j]=${tmp}
                  changed_something=true
               fi
            done
         done
         for p in ${modbefore[i]}; do
            for (( j=0; j<nmods; j++ )); do
               [[ ${p} != ${MODULES[j]} && ${p} != ${PROVIDES[j]} ]] && continue
               if [[ ${modnums[i]} -gt ${modnums[j]} ]]; then
                  tmp=${modnums[i]}
                  modnums[i]=${modnums[j]}
                  modnums[j]=${tmp}
                  changed_something=true
               fi
            done
         done
      done
      ${changed_something} || break
      sort_history[k]="${modnums[*]}"
      if [[ ${sort_history[k]} == ${sort_history[k/2]} ]]; then
         eerror "Detected an infinite loop sorting modules; blundering ahead"
         break
      fi
   done
   um=""
   for (( i=0; i<nmods; i++ )); do
      um="${um}${modnums[i]} ${MODULES[i]} ${PROVIDES[i]}\n"
   done
   p=( $( echo -e "${um}" | sort -n | awk '{print $2,$3}' ) )
   MODULES=()
   PROVIDES=()
   j=0
   for (( i=0; i<${#p[@]}; i+=2 )); do
      MODULES[j]=${p[i]}
      PROVIDES[j]=${p[i+1]}
      (( j++ ))
   done
}
modules_check_depends() {
   local showprovides=${1:-false} nmods=${#MODULES[@]} i j needmod
   local missingdeps p  interface=false
   for (( i=0; i<nmods; i++ )); do
      if [[ $( type -t ${MODULES[i]}_need ) == function ]]; then
         for needmod in $( ${MODULES[i]}_need ); do
            missingdeps=true
            for (( j=0; j<nmods; j++ )); do
               if [[ ${needmod} == ${MODULES[j]} || ${needmod} == ${PROVIDES[j]} ]]; then
                  missingdeps=false
                  break
               fi
            done
            if ${missingdeps} ; then
               eerror "${MODULES[i]} needs ${needmod} (dependency failure)"
               return 1
            fi
         done
      fi
      ${MODULES[i]}_check_depends || return 1
      [[ ${PROVIDES[i]} == interface ]] && interface=true

      if ${showprovides} ; then
         [[ ${PROVIDES[i]} != ${MODULES[i]} ]] && veinfo "${MODULES[i]} provides ${PROVIDES[i]}"
      fi
   done
   if ! ${interface} ; then
      eerror "no interface module has been loaded"
      return 1
   fi
   return 0
}
modules_load()  {
   local iface=${1} starting=${2:-true} mod p=false i j unsetfuncs
   local -a x
   local RC_INDENTATION=${RC_INDENTATION}
   local -a PROVIDES

   if [[ ${iface} == lo ]]; then
      modules_force=( "iproute2" "ifconfig" )
   else
      eval x=( \"\$\{modules_force_${iface}\[@\]\}\" )
      [[ -n ${x} ]] && modules_force=( "${x[@]}" )
      if [[ -n ${modules_force} ]]; then
         ewarn "WARNING: You are forcing modules!"
         ewarn "Do not complain or file bugs if things start breaking"
         report=true
      fi
      veinfo "Loading networking modules for ${iface}"
   fi
   eindent
   if [[ -z ${modules_force} ]]; then
      modules_load_auto || return 1
   else
      j=${#modules_force[@]}
      for (( i=0; i<j; i++ )); do
         module_load_minimum "${MODULES_DIR}/${modules_force[i]}" || return 1
         ${modules_force[i]}_check_installed || unset modules_force[i]
      done
      MODULES=( "${modules_force[@]}" )
   fi
   j=${#MODULES[@]}
   for (( i=0; i<j; i++ )); do
      PROVIDES[i]=$( ${MODULES[i]}_provides )
   done
   if [[ -z ${modules_force[@]} ]]; then
      if ${starting}; then
         modules_check_user || return 1
      fi
      [[ -n ${unsetfuncs} ]] && unset ${unsetfuncs}
      modules_sort
   fi
   j=${#MODULES[@]}
   for (( i=0; i<j; i++ )); do
      module_class_wrap ${MODULES[i]} ${PROVIDES[i]}
   done
   modules_check_installed || return 1
   [[ ${iface} != lo ]] && veinfo "modules: ${MODULES[@]}"
   eindent
   [[ ${iface} != lo && ${starting} == true ]] && p=true
   modules_check_depends ${p} || return 1
   return 0
}
iface_start() {
   local iface=${1} mod config_counter=-1 x warn=false config_worked=false
   local RC_INDENTATION=${RC_INDENTATION}   # so it will reset after function
   local -a config fallback fallback_route conf
   local ifvar=$( interface_variable ${iface} )
   for mod in ${MODULES[@]}; do
      if [[ $( type -t ${mod}_pre_start ) == function ]]; then
         ${mod}_pre_start ${iface} || { eend 1; return 1; }
      fi
   done
   eval config=( \"\$\{config_${ifvar}\[@\]\}\" )
   eval fallback=( \"\$\{fallback_${ifvar}\[@\]\}\" )
   eval fallback_route=( \"\$\{fallback_route_${ifvar}\[@\]\}\" )
   if [[ -z ${config} ]]; then
      interface_get_old_config ${iface} || return 1
   fi
   if [[ ${config[0]} == "noop" ]]; then
      if interface_is_up ${iface} true ; then
         einfo "Keeping current configuration for ${iface}"
         eend 0
         return 0
      fi
      config=( "${config[@]:1}" )
   fi
   if [[ -z ${config} ]]; then
      if [[ $( type -t dhcp_start ) == function ]]; then
         config=( "dhcp" )
         warn=true
      else
         eerror "Cannot default to dhcp as there is no dhcp module loaded"
         eerror "No configuration for ${iface}"
         return 1
      fi
   fi
   einfo "Bringing up ${iface}"
   eindent
   for (( config_counter=0; config_counter<${#config[@]}; config_counter++ )); do
      if [[ ${config[config_counter]} == "null" \
      || ${config[config_counter]} == "noop" ]]; then
         eend 0
         config_worked=true
         continue
      fi
      if ${warn}; then
         ewarn "Configuration not set for ${iface} - assuming dhcp"
         warn=false
      fi
      conf=( ${config[config_counter]} )
      einfo "${conf[0]}"
      if [[ $( type -t ${conf[0]}_start ) == function ]]; then
         x=false
         for mod in ${MODULES[@]}; do
            if [[ $( ${mod}_provides ) == ${conf[0]} ]]; then
               x=true
               break
            fi
         done
         if ! ${x}; then
            [[ $( type -t ${conf[0]}_check_installed == function ) ]] && ${conf[0]}_check_installed true
            eerror "No loaded modules provide \"${conf[0]}\" (${conf[0]}_start)"
         else
            eindent
            ${conf[0]}_start ${iface} ; x=$?
            eoutdent
            [[ ${x} == 0 ]] && config_worked=true && continue
         fi
      elif [[ ${conf[0]:0:1} == [[:digit:]] || ${conf[0]} == *:* ]]; then
         x=0
         [[ ${x} == 0 ]] && interface_add_address ${iface} ${conf[@]} ; x=$?
         eend ${x} && config_worked=true && continue
      else
         eerror "No loaded modules provide \"${conf[0]}\" (${conf[0]}_start)"
      fi
      if [[ -n ${fallback[config_counter]} ]]; then
         einfo "Trying fallback configuration"
         config[config_counter]=${fallback[config_counter]}
         fallback[config_counter]=''
         if [[ -n ${fallback_route[config_counter]} ]]; then
            eval "routes_${ifvar}=( "\"\$\{fallback_route\[${config_counter}\]\[@\]\}\"" )"
            fallback_route[config_counter]=''
         fi
         (( config_counter-- ))
         continue
      fi
   done
   eoutdent
   ${config_worked} || return 1
   for mod in ${MODULES[@]}; do
      if [[ function == $( type -t ${mod}_post_start ) ]]; then
         ${mod}_post_start ${iface} || return 1
      fi
   done
   return 0
}
iface_stop() {
   local iface=${1} i aliases need_begin=false mod
   local RC_INDENTATION=${RC_INDENTATION}
   for mod in ${MODULES[@]}; do
      [[ $( type -t ${mod}_pre_stop ) == function ]] && ${mod}_pre_stop ${iface}
   done
   einfo "Bringing down ${iface}"
   eindent
   aliases=$( interface_get_aliases_rev ${iface} )
   for i in ${aliases} ${iface}; do
      for mod in ${MODULES[@]}; do
         [[ $( type -t ${mod}_stop ) == function ]] && ${mod}_stop ${i}
      done
      interface_exists ${iface} || { eend 0; continue; }
      interface_del_addresses ${i}
      ebegin "Shutting down ${i}"
      interface_iface_stop ${i}
      eend $?
   done
   for mod in ${MODULES[@]}; do
      [[ $( type -t ${mod}_post_stop ) == function ]] && ${mod}_post_stop ${iface}
   done
   return 0
}
run_start() {
   local iface=${1} ifvar x

   if [[ ${iface} == lo ]]; then
      ebegin "Bringing up ${iface}"
      interface_loopback_create
      eend $?
      return $?
   fi
   if ! interface_exists ${iface} ; then
      /sbin/modprobe ${iface} &>/dev/null
   fi
   ifvar=$( interface_variable ${iface} )
   local IFACE=${iface} IFVAR=${ifvar}
   if [[ $( type -t preup ) == function ]]; then
      einfo "Running preup function"
      eindent
      preup ${iface} ; x=$?
      eoutdent
      if [[ ${x} != 0 ]]; then
         eerror "preup ${iface} failed"
         return 1
      fi
   fi
   iface=${1}
   local IFACE=${iface} IFVAR=${ifvar} config
   eval config=( \"\$\{config_${ifvar}\[@\]\}\" )
   if [[ ${config[0]} == "noop" ]] && interface_is_up ${iface} true ; then
      einfo "Keeping current configuration for ${iface}"
      eend 0
   else
      [[ ${config[0]} == "noop" ]] && eval "config_${ifvar}=( "\"\$\{config\[@\]:1\}\"" )"
      interface_del_addresses ${iface}
      if ! iface_start ${iface} ; then
         interface_down ${iface}
         eend 1
         return 1
      fi
   fi
   if [[ $( type -t postup ) == function ]]; then
      einfo "Running postup function"
      eindent
      postup ${iface}
      eoutdent
   fi

   return 0
}
run_stop() {
   local iface=${1} ifvar x
   if [[ ${iface} == lo ]]; then
      ebegin "Shutting down ${iface}"
      interface_iface_stop ${iface}
      eend $?
      return 0
   fi
   ifvar=$( interface_variable ${iface} )
   local IFACE=${iface} IFVAR=${ifvar}
   if [[ $( type -t predown ) == function ]]; then
      einfo "Running predown function"
      eindent
      predown ${iface} ; x=$?
      eoutdent
      if [[ ${x} != 0 ]]; then
         eend 1 "predown ${iface} failed"
         return 1
      fi
   elif is_net_fs /; then
      eerror "root filesystem is network mounted -- can't stop ${iface}"
      return 1
   fi
   iface=${1}
   local IFACE=${iface} IFVAR=${ifvar}
   iface_stop ${iface} || return 1
   if [[ $( type -t postdown ) == function ]]; then
      einfo "Running postdown function"
      eindent
      postdown ${iface}
      eoutdent
   fi

   return 0
}
run() {
   local iface=${1} cmd=${2} r=1 RC_INDENTATION=${RC_INDENTATION}
   local before starting=true
   local -a MODULES mods
   eindent
   unset_functions=${unset_functions:-false}
   ${unset_functions} && before="$( typeset -F )"
   [[ ${cmd} == "stop" ]] && starting=false
   if modules_load ${iface} ${starting} ; then
      if [[ ${cmd} == "stop" ]]; then
         mods=( "${MODULES[@]}" )
         for ((i = 0; i < ${#mods[@]}; i++)); do
            MODULES[i]=${mods[((${#mods[@]} - i - 1))]}
         done

         run_stop ${iface} && r=0
      else
         run_start ${iface} && r=0
      fi
   fi
   ${unset_functions} && \
   unset $( diff -U0 <( echo "${before}" ) <( echo "$( typeset -F )" ) 2>/dev/null \
      | awk 'BEGIN { ORS = " "; } /+declare -f/ { print $3; }' ) 2>/dev/null

   return ${r}
}
start() {
   einfo "Starting ${IFACE}"
   run ${IFACE} start
   return $?
}
stop() {
   einfo "Stopping ${IFACE}"
   run ${IFACE} stop
   return $?
}
restart() {
   local unset_functions=true
   service_started "${myservice}" && svc_stop
   unset_functions=false
   svc_start
   return $?
}


Ich benutze dieses Script für meine wlan- wie auch eth-Karte. Hin und wieder bockt es zwar (vor allem, wenn ich mal die WLan-Karte nicht drinn habe), aber in 99% aller Starts funktioniert es.
_________________
Anstrengungen, ein Programm "User-freundlich" zu machen, führen zu neuer Arbeit an den "Computerkenntnissen" der User.
Back to top
View user's profile Send private message
leo2k
Apprentice
Apprentice


Joined: 28 Mar 2005
Posts: 223
Location: karlsruhe

PostPosted: Wed Jun 08, 2005 2:32 pm    Post subject: Reply with quote

naja, ich werde jetzt aber mit sicherheit kein script einbauen wo ich nich weis was es tut. zumal ich kein wlan hab.
irgendwo müsste da drin ja die passage für die eth0 karte stehen, oder?

leo
_________________
meine hp ölrechner.de
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6378
Location: Graz / EU

PostPosted: Wed Jun 08, 2005 4:29 pm    Post subject: Reply with quote

psyqil wrote:
Ist da nicht alle 100.000 Pakete ein Ölwechsel nötig? :twisted: SCNR...

Verdammt, um Ölwitze zu machen bin ich eindeutig zu spät dran.

Taucht die Karte bei ifconfing -a auf?
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
sebastianm
n00b
n00b


Joined: 06 Jun 2005
Posts: 16
Location: Germany, Moenchengladbach

PostPosted: Thu Jun 09, 2005 6:55 am    Post subject: Reply with quote

leo2k wrote:

Code:
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/net.lo,v 1.10 2004/04/21 17:09:18 vapier Exp $

start() {
        ebegin "Bringing ${IFACE} up"
        /sbin/ifconfig lo 127.0.0.1 up 2>/dev/null
        /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 \
                gw 127.0.0.1 dev lo 2> /dev/null
        eend 0
}

stop() {
        ebegin "Bringing ${IFACE} down"
        /sbin/ifconfig ${IFACE} down &>/dev/null
        eend 0
}

leo


Also das sieht doch extrem schwer nach dem falschen Skript aus. Existiert bei Dir auch ein net.eth0 Skript in init.d? Bei mir existiert für so ziemlich jedes Device (Netzwerk) so eins. Wenn man in das Skript dann mal reinguckt findet man auch recht schnell den entscheidenden Teil (Ausschau nach dhcpcd halten). Außerdem wird darauf verwiesen, dass der seine config von /etc/conf.d/net bekommt. Poste die doch mal hier, dann sieht man vielleicht mehr.

Mal ne Vermutung: Du hast net-setup bei der Installation von Gentoo verwendet um das Netzwerk einzurichten, oder er hat es sogar von selber erkannt?
Vermutung 2: Das Problem taucht erst auf, seitdem Du etc-update gemacht hast?
Was allerdings dagegen spricht ist, dass Dein Rechner dann die Standard-IP 192.168.0.2 beim Start bekommen müsste, oder ist dem so?
Back to top
View user's profile Send private message
leo2k
Apprentice
Apprentice


Joined: 28 Mar 2005
Posts: 223
Location: karlsruhe

PostPosted: Mon Jun 13, 2005 5:06 pm    Post subject: Reply with quote

das hier ist mein /etc/conf.d/net
Code:
# /etc/conf.d/net:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="192.168.1.103 broadcast 192.168.1.255 netmask 255.255.255.0"
#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
#iface_eth0="dhcp"
#dhcpcd_eth0="..."

# For adding aliases to a interface
#
#alias_eth0="192.168.0.3 192.168.0.4"

# NB:  The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly.  Leave commented to assign
# defaults for that interface.
#
#broadcast_eth0="192.168.0.255 192.168.0.255"
#netmask_eth0="255.255.255.0 255.255.255.0"


# For setting the default gateway
#
gateway="eth0/192.168.1.1"
die habe ich wohlgemerkt auf der suche nach dem fehler geändert. vorher war alles auskommentiert bis auf die zeile iface_eth0="dhcp"
ja, wahrscheinlich ist der fehler seit einem nicht ganz achtsamen etc-config aufgetreten. aber mit bestimmtheit sagen kann ich das jetzt nicht mehr, da ich meinen rechner so selten reboote kann es auch was anderes gewesen sein.

gruß
leo
_________________
meine hp ölrechner.de
Back to top
View user's profile Send private message
happyfish
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2005
Posts: 103

PostPosted: Mon Jun 13, 2005 6:42 pm    Post subject: Reply with quote

Quote:
ja, wahrscheinlich ist der fehler seit einem nicht ganz achtsamen etc-config aufgetreten.

genau!
deine /etc/conf.d/net und die /etc/init.d/net.lo entsprechen noch dem alten baselayout. du hast bestimmt die updates vorgestern bei etc-update weggeklickt. oben ist ein thread angenagelt, wo steht, wie du die updates wieder zurückbekommst ;-)
btw: ich selbst hab auch eine komplett auskommentierte /etc/conf.d/net und die alte version von /etc/init.d/net.lo. beim booten werden eth0 und eth1 gestartet (und danach hol ich mir mit dhcpcd -HD die IP, je nachdem ob LAN oder WLAN) - klappt astrein.
Back to top
View user's profile Send private message
sebastianm
n00b
n00b


Joined: 06 Jun 2005
Posts: 16
Location: Germany, Moenchengladbach

PostPosted: Tue Jun 14, 2005 12:56 pm    Post subject: Reply with quote

Ich würde auch mal auf die Vermutung von happyfish setzen, denn mein Post war vor dem neuen Baselayout.

Versuch mal iface_eth0... durch config_eth0=("dhcp") zu ersetzen, dann müßte es passen.

Der erwähnte Thread...
Back to top
View user's profile Send private message
sebastianm
n00b
n00b


Joined: 06 Jun 2005
Posts: 16
Location: Germany, Moenchengladbach

PostPosted: Tue Jun 14, 2005 2:59 pm    Post subject: Reply with quote

Hatte gerade kurzzeitig das gleiche Problem... Lag daran, dass ich nur nach der Anleitung vorgegangen bin, vorher aber dhcpcd benutzt habe und kein dhcp emerged hatte - und das auch nicht konnte, da ich keine Adresse hatte!

Code:
config_eth0=( "dhcp" )
modules_eth0=( "dhcpcd" )
dhcpcd_eth0="-t 5"


hat bei mir funktioniert. Ansonsten gibts hier ne ausführliche Anleitung.
Back to top
View user's profile Send private message
happyfish
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2005
Posts: 103

PostPosted: Tue Jun 14, 2005 4:06 pm    Post subject: Reply with quote

ich probier jetzt auch das neue baselayout und hab noch zwei fragen (krieg es einfach nicht alleine hin):

1) hab ich das kabel drin, wird eth0 ordnungsgemäß beim booten gestartet. hab ich es nicht drin, wiederholt der pc beim booten dreimal den versuch einer zuweisung. wie kann ich das unterdrücken?

/etc/conf.d/net nach neuem baselayout:
Code:

config_eth0=( "dhcp" )
dhcpcd_eth0="-t 5"


EDIT:
2) wlan geht nun
/etc/conf.d/wireless nach neuem baselayout:
Code:

essid_eth1="mySSID"
key_mySSID="XXXXXXXXXXXXXXXXXXXXXXXXXX"
config_mySSID=( "dhcp" )
dhcpcd_mySSID="-t 5"

wichtig: in /etc/conf.d/net darf
Code:
modules=( "iwconfig" )
nicht auskommentiert sein!

Last edited by happyfish on Tue Jun 14, 2005 10:15 pm; edited 4 times in total
Back to top
View user's profile Send private message
CHs
n00b
n00b


Joined: 17 Oct 2004
Posts: 71

PostPosted: Tue Jun 14, 2005 4:17 pm    Post subject: Reply with quote

Quote:
1) hab ich das kabel drin, wird eth0 ordnungsgemäß beim booten gestartet. hab ich es nicht drin, wiederholt der pc beim booten dreimal den versuch einer zuweisung. wie kann ich das unterdrücken?


Eine Antwort darauf habe ich nicht direkt, aber wenn du das Kabel öfter rausziehst, könntest du ifplugd verwenden, welches das Interface nur bei eingestecktem Kabel startet, bzw. wenn du das Kabel reinsteckst.
Back to top
View user's profile Send private message
leo2k
Apprentice
Apprentice


Joined: 28 Mar 2005
Posts: 223
Location: karlsruhe

PostPosted: Fri Jun 17, 2005 7:23 am    Post subject: Reply with quote

ich bins nochmal

jetzt funktioniert alles.
es lag daran dass ich noch das alte init-script von net.lo drin hatte


leo
_________________
meine hp ölrechner.de
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum