network/openresolv: Updated for version 3.9.0.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
Jeremy Hansen 2017-11-17 21:06:17 +00:00 committed by Willy Sudiarto Raharjo
parent e8c1c5d593
commit 595a414ca9
5 changed files with 26 additions and 33 deletions

View file

@ -1,19 +1,17 @@
management framework for resolv.conf
openresolv (management framework for resolv.conf)
Allows multiple daemons to manage resolv.conf and configures
local resolvers such as dnsmasq and unbound.
Allows multiple daemons to manage resolv.conf and configures local
resolvers such as dnsmasq and unbound.
This package may require some manual configuration. Please
read resolvconf(8) and resolvconf.conf(5) for detailed
instructions.
This package may require some manual configuration. Please read
resolvconf(8) and resolvconf.conf(5) for detailed instructions.
If using openvpn and the following lines were added to
openvpn client configuration file:
Passing OPENVPN=yes will add the update-resolv-conf script to
/etc/openvpn/. To use the script, make sure the following lines are
added to your openvpn client configuration file.
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
by passing OPENVPN=yes to the SlackBuild script, it will
copy update-resolv-conf file to /etc/openvpn folder.
Please consult update-resolv-conf before doing this.
Please consult /etc/openvpn/update-resolv-conf before using the script.
It will likely require editing before use.

View file

@ -12,3 +12,7 @@ config() {
}
config etc/resolvconf.conf.new
# This file is optional (added with OPENVPN=yes); let's make sure it exists
if [ -e etc/openvpn/update-resolv-conf.new ]; then
config etc/openvpn/update-resolv-conf.new
fi

View file

@ -3,6 +3,7 @@
# Slackware build script for openresolv
# Copyright 2012-2013 synbq Bucharest
# Copyright 2017 Jeremy Hansen <jebrhansen+SBo -at- gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -24,7 +25,7 @@
PRGNAM=openresolv
VERSION=${VERSION:-3.9.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -40,16 +41,10 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
# Enable OPENVPN - Defaulting to no
if [ "${OPENVPN:-no}" = "no" ]; then
USE_OPENVPN=""
else
if [ -d /etc/openvpn ]; then
USE_OPENVPN="install -m755 $CWD/update-resolv-conf $PKG/etc/openvpn/"
else
# If building openvpn support, ensure it's installed
if [ "${OPENVPN:-no}" = "yes" ] && [ ! -d /etc/openvpn ]; then
echo "You must to have openvpn installed"
exit 1
fi
fi
if [ "$ARCH" = "i586" ]; then
@ -85,7 +80,7 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--libexecdir=/usr/libexec/openresolv \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
@ -94,10 +89,6 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
if [ "$ARCH" = "x86_64" ]; then
mv $PKG/usr/lib $PKG/usr/lib${LIBDIRSUFFIX}
fi
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@ -110,7 +101,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
if [ "${OPENVPN}" = "yes" ]; then
mkdir -p $PKG/etc/openvpn
$USE_OPENVPN
install -m 0755 $CWD/update-resolv-conf $PKG/etc/openvpn/update-resolv-conf.new
fi
mv $PKG/etc/resolvconf.conf $PKG/etc/resolvconf.conf.new

View file

@ -6,5 +6,5 @@ MD5SUM="177ad48b768d4d1bf37510f1af99dffe"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="syncbq"
EMAIL="syncrico@gmail.com"
MAINTAINER="Jeremy Hansen"
EMAIL="jebrhansen+SBo@gmail.com"

View file

@ -1,16 +1,16 @@
#!/bin/bash
#
#
# Parses DHCP options from openvpn to update resolv.conf
# To use set as 'up' and 'down' script in your openvpn *.conf:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
#
# Used snippets of resolvconf script by Thomas Hood <jdthood@yahoo.co.uk>
# Used snippets of resolvconf script by Thomas Hood <jdthood@yahoo.co.uk>
# and Chris Hanson
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL.
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL.
#
# 05/2006 chlauber@bnc.ch
#
#
# Example envs set from openvpn:
# foreign_option_1='dhcp-option DNS 193.43.27.132'
# foreign_option_2='dhcp-option DNS 193.43.27.133'