#1 Möglichkeit einen dns-nameserver zu konfigurieren

Fermé
Créé il y a 3 ans par dlack · 2 commentaires

Der Eintrag dns-nameservers in der /etc/network/interfaces hat keinen Effekt.

bisherige "Notlösung"

post-up echo 'nameserver <IP-HERE>' > /etc/resolv.conf

Der Eintrag wird beim Speichern mit Hilfe der libgfanet entfernt.

Der Eintrag dns-nameservers in der /etc/network/interfaces hat keinen Effekt. bisherige "Notlösung" post-up echo 'nameserver <IP-HERE>' > /etc/resolv.conf Der Eintrag wird beim Speichern mit Hilfe der libgfanet entfernt.
Daniel Lackmann a commenté il y a 3 ans
Publier

HOOK SCRIPTS

https://manpages.debian.org/testing/ifupdown/interfaces.5.en.html#HOOK_SCRIPTS

Evtl. könnte ein script im order /etc/network/if-up.d/ helfen

/etc/network/if-pre-up.d/

Scripts in this directory are run before bringing the interface up.

/etc/network/if-up.d/

Scripts in this directory are run after bringing the interface up.

/etc/network/if-down.d/

Scripts in this directory are run before bringing the interface down.

/etc/network/if-post-down.d/

Scripts in this directory are run after bringing the interface down.

# HOOK SCRIPTS https://manpages.debian.org/testing/ifupdown/interfaces.5.en.html#HOOK_SCRIPTS Evtl. könnte ein script im order /etc/network/if-up.d/ helfen /etc/network/if-pre-up.d/ Scripts in this directory are run before bringing the interface up. /etc/network/if-up.d/ Scripts in this directory are run after bringing the interface up. /etc/network/if-down.d/ Scripts in this directory are run before bringing the interface down. /etc/network/if-post-down.d/ Scripts in this directory are run after bringing the interface down.
Daniel Lackmann a commenté il y a 3 ans
Publier

Beispiel für /etc/network/if-up.d/nameserver

#!/bin/sh
beep
grep -e "dns-nameservers"  /etc/network/interfaces | sed -e 's/dns-nameservers/nameserver/g' | awk '!x[$0]++' > /etc/resolv.conf 
Beispiel für /etc/network/if-up.d/nameserver #!/bin/sh beep grep -e "dns-nameservers" /etc/network/interfaces | sed -e 's/dns-nameservers/nameserver/g' | awk '!x[$0]++' > /etc/resolv.conf
Connectez-vous pour rejoindre cette conversation.
Pas d'étiquette
Aucun jalon
Pas d'assignataire
1 Participants
Chargement…
Annuler
Enregistrer
Il n'existe pas encore de contenu.