yaVDR 0.6.2 kein Netzwerk nach booten

  • Hallo zusammen,


    manchmal findet Linux kein Netzwerk beim booten (warum auch immer)

    Ich möchte nun einen Test (z.B. ping auf das default Gateway) in den Bootvorgang einbauen.


    \etc\network\if-up.d\check_network


    Bash
    #!/bin/bash
    
    ping -c5 10.0.0.1 > /dev/null
    if [ $? -ne 0 ]; then
      logger System rebooted due to network failure
      reboot
    fi


    Das verursacht aber einen Dauerbootloop.


    Habt ihr einen Tipp für mich wo ich das einbaue?


    Ich hab gesehen yaVDR erkennt auch, dass kein Netzwerk da ist und wartet 1 Minute oder so.

    Ich finde aber nicht wo das gecheckt wird.

    Vielleicht könnte ich es ja da einbauen.


    Vielen Dank & Grüße

    JurKub

    VDR1: Asus P5B, 2048MB, 2 x Mystique SaTiX-S2 V2 CI Dual, Colorful G210, 7" Display, 1TB 2,5" SATA HD, Compact Flash to SATA 8GB CF Card --> yaVDR 0.6.1
    VDR2: Asus
    B85M-E, 8192MB, 1 x TT-Budget S2-3200 PCI, MSI GF GTX 1050-2GB, SATA Flash Modul 8GB --> yaVDR 0.6.1
    VDR3: Acer Revo 3600, 2048MB, Compact Flash to SATA 8GB CF Card --> yaVDR 0.6.1

  • yaVDR 0.6 basiert noch auf Ubuntu 14.04 und nutzt damit Upstart als Init-System (http://upstart.ubuntu.com/cookbook/). Beim Erreichen des Runlevel 2 sollte das Netzwerk dann hoffentlich da sein, daher könnte man z.B. sowas versuchen:


    Code: /etc/init/reboot-if-no-network.conf
    start on runlevel 2
    script
    if ping -q -c5 10.0.0.1; then
      logger "System rebooted due to network failure"
      reboot
    fi
    exit 0
    end script


    Falls möglich würde ich auf yavdr-ansible umsteigen, dann hast du nicht ein seit Jahren ungepflegtes System als Basis.

    yaVDR-Dokumentation (Ceterum censeo enchiridia esse lectitanda.)

  • Falls möglich würde ich auf yavdr-ansible umsteigen, dann hast du nicht ein seit Jahren ungepflegtes System als Basis.

    Bin ich schon dran, kämpfe aber noch mit dem Lirc Stuff


    so rum funktioniert es und wird auch nur 1 x ausgeführt (ist von avahi-daemon geklaut )

    die if Abfrage von Ping war falsch rum ;)

    VDR1: Asus P5B, 2048MB, 2 x Mystique SaTiX-S2 V2 CI Dual, Colorful G210, 7" Display, 1TB 2,5" SATA HD, Compact Flash to SATA 8GB CF Card --> yaVDR 0.6.1
    VDR2: Asus
    B85M-E, 8192MB, 1 x TT-Budget S2-3200 PCI, MSI GF GTX 1050-2GB, SATA Flash Modul 8GB --> yaVDR 0.6.1
    VDR3: Acer Revo 3600, 2048MB, Compact Flash to SATA 8GB CF Card --> yaVDR 0.6.1

    Einmal editiert, zuletzt von JurKub ()

  • gestern hat das Script den Rechner das erst Mal gebootet !

    es funktioniert also ;)

    VDR1: Asus P5B, 2048MB, 2 x Mystique SaTiX-S2 V2 CI Dual, Colorful G210, 7" Display, 1TB 2,5" SATA HD, Compact Flash to SATA 8GB CF Card --> yaVDR 0.6.1
    VDR2: Asus
    B85M-E, 8192MB, 1 x TT-Budget S2-3200 PCI, MSI GF GTX 1050-2GB, SATA Flash Modul 8GB --> yaVDR 0.6.1
    VDR3: Acer Revo 3600, 2048MB, Compact Flash to SATA 8GB CF Card --> yaVDR 0.6.1

Jetzt mitmachen!

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