1. Dashboard
  2. Forum
    1. Unerledigte Themen
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team-Mitglieder
    4. Trophäen
    5. Mitgliedersuche
  4. Tutorial Bereich
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Seiten
  • Forum
  • Lexikon
  • Erweiterte Suche
  1. Informatik Forum
  2. Software und Anwendungen
  3. Betriebssysteme

ifplugd startet nicht automatisch.

    • Linux
  • baracuda
  • 19. Juli 2011 um 00:06
  • Unerledigt
  • baracuda
    7
    baracuda
    Mitglied
    Punkte
    410
    Beiträge
    51
    • 19. Juli 2011 um 00:06
    • #1

    Hi,

    Ich verwende ein Gentoosystem mit "Gentoo Base System release 2.0.2" und Kernelversion "2.6.38-gentoo-r6". Ifplugd liegt in der Version "sys-apps/ifplugd-0.28-r9" vor.

    Jetzt heisst es, dass ifplugd in das baselayout integriert wurde. Es fehlt für ifplugd das init Skript. Es sollte eigentlich starten wenn das entsprechende Interface hochgeht (bei mir eth0).

    Die /etc/conf.d/net schaut folgender Maßen aus

    Code
    # This blank configuration will automatically use DHCP for any net.*
    # scripts in /etc/init.d.  To create a more complete configuration,
    # please review /usr/share/doc/openrc/net.example and save your configuration
    # in /etc/conf.d/net (this file :]!).
    modules_eth0=("dhcpcd")
    config_eth0=( "dhclient" )
    
    
    # wpa_supplicant gegen�ber wireless-tools bevorzugen
    modules_wlan0=("wpa_supplicant")
    
    
    # Es ist wichtig, dass wir wpa_supplicant mitteilen welcher Treiber
    # verwendet werden soll, da es nicht sehr gut raten kann.
    wpa_suppclient_wlan0="-Dwext"
    
    
    config_wlan0=("dhclient")
    
    
    ifplugd_eth0="..."
    ifplugd_eth0="--api-mode=wlan"
    Alles anzeigen

    Die /etc/ifplugd/ifplugd.action schaut so aus

    Bash
    #!/bin/sh
    # Copyright 1999-2004 Gentoo Foundation
    # Distributed under the terms of the GNU General Public License v2
    #
    # Gentoo-specific ifplugd.action
    #
    # This file gets called by ifplugd when it wants to bring an interface
    # up or down.
    #
    
    
    if grep -q initng /proc/1/cmdline
    then
        EXEC="/sbin/ngc"
        INITNG="yes"
    else
        EXEC="/etc/init.d/net.$1"
        INITNG="no"
    fi
    
    
    case "$2" in
        up)
            if [ '${INITNG}' = 'yes' ]
            then
                ARGS="-u net/$1"
            else
                dhclient eth0
                ARGS="--quiet start"
            fi
            ;;
        down)
            if [ '${INITNG}' = 'yes' ]
            then
                ARGS="-d net/$1"
            else
                ARGS="--quiet stop"
            fi
            ;;
        *)
            echo "$0: wrong arguments" >&2
            echo "Call with <interface> <up|down>" >&2
            exit 1
            ;;
    esac
    
    
    export IN_BACKGROUND=true
    
    
    if [ -x '${EXEC}' ]
    then
        ${EXEC} ${ARGS}
        exit 0
    else
        logger -t ifplugd.action "Error: Couldn't configure $1, no ${EXEC} !"
        exit 1
    fi
    
    
    # vim: set ts=4
    Alles anzeigen

    Das Problem ist jetzt jedoch, dass ifplgud einfach nicht startet. Erst wenn ich manuell ifplugd starte wird automatisch eine IP vergben, wenn ich ein Kabel anstecke.

    Mir ist nicht klar wie ich ifplugd starten, soll wenn ich es keinem runlevel zuordnen kann und es von selbst nicht startet wenn das eth0 up geht.

    Code
    modules |         boot
                 net.eth0 | default
               localmount |         boot
                 netmount | default
                syslog-ng | default
                savecache |              shutdown
                    dmesg |                       sysinit
                  urandom |         boot
                net.wlan0 | default
                     swap |         boot
                    local | default
                     mtab |         boot
                   procfs |         boot
                  keymaps | default
                killprocs |              shutdown
                  hwclock |         boot
                     root |         boot
                     udev |                       sysinit
                 hostname |         boot
           udev-postmount | default
                     dbus | default
                   net.lo |         boot
                   sysctl |         boot
                     fsck |         boot
                    devfs |                       sysinit
               vixie-cron | default
                 mount-ro |              shutdown
                      xdm | default
                 bootmisc |         boot
                     sshd | default
    Alles anzeigen

    Alle interfaces haben starten beim boot.

    LG

    “For God's sake, give me the young man who has brains enough to make a fool of himself”, Robert Louis Stevenson

  • Maximilian Rupp 27. Dezember 2024 um 00:09

    Hat das Thema aus dem Forum Betriebssysteme nach Betriebssysteme verschoben.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!

Benutzerkonto erstellen Anmelden

Tags

  • gentoo
  • eth0
  • ifplugd

Benutzer online in diesem Thema

  • 1 Besucher

Rechtliches

Impressum

Datenschutzerklärung