diff options
-rw-r--r-- | network/openresolv/README | 22 | ||||
-rw-r--r-- | network/openresolv/doinst.sh | 4 | ||||
-rw-r--r-- | network/openresolv/openresolv.SlackBuild | 21 | ||||
-rw-r--r-- | network/openresolv/openresolv.info | 4 | ||||
-rw-r--r-- | network/openresolv/update-resolv-conf | 8 |
5 files changed, 26 insertions, 33 deletions
diff --git a/network/openresolv/README b/network/openresolv/README index a8fe589df9..abe4b9d7c7 100644 --- a/network/openresolv/README +++ b/network/openresolv/README @@ -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. diff --git a/network/openresolv/doinst.sh b/network/openresolv/doinst.sh index 91e8b4078c..810b1c10cb 100644 --- a/network/openresolv/doinst.sh +++ b/network/openresolv/doinst.sh @@ -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 diff --git a/network/openresolv/openresolv.SlackBuild b/network/openresolv/openresolv.SlackBuild index 61e7e7eef0..5e4735da16 100644 --- a/network/openresolv/openresolv.SlackBuild +++ b/network/openresolv/openresolv.SlackBuild @@ -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 diff --git a/network/openresolv/openresolv.info b/network/openresolv/openresolv.info index 47096235d7..44dc4e4482 100644 --- a/network/openresolv/openresolv.info +++ b/network/openresolv/openresolv.info @@ -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" diff --git a/network/openresolv/update-resolv-conf b/network/openresolv/update-resolv-conf index 5a9d17b169..3c95f84531 100644 --- a/network/openresolv/update-resolv-conf +++ b/network/openresolv/update-resolv-conf @@ -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' |