This repository has been archived on 2024-07-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
etckeeper/ppp/ip-up.d/000resolvconf
2021-12-01 11:23:54 +01:00

13 lines
399 B
Bash
Executable File

#!/bin/sh
# ppp.ip-up hook script for resolvconf
# Written by Roy Marples <roy@marples.name> under the BSD-2 license
[ -x /sbin/resolvconf ] || exit 0
if [ -n "$DNS1" -o -n "$DNS2" ]; then
conf="# Generated by ppp.ip-up for $PPP_IFACE\n"
[ -n "$DNS1" ] && conf="${conf}nameserver $DNS1\n"
[ -n "$DNS2" ] && conf="${conf}nameserver $DNS2\n"
printf "$conf" | /sbin/resolvconf -a "$PPP_IFACE"
fi