X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id C02BADC09F3 for ; Wed, 20 Jan 2016 21:17:03 +0000 (UTC) Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 80DA0DC06F9 for ; Wed, 20 Jan 2016 21:17:02 +0000 (UTC) Received: by mail-pf0-f173.google.com with SMTP id 65so10739351pff.2 for ; Wed, 20 Jan 2016 13:17:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chriskankiewicz.com; s=google; h=from:to:cc:subject:date:message-id; bh=5+pmx38ehBoQQKz5nz796/eDuPzRaYHdhEAqorlwh78=; b=T9ro91+hHtb1EDmILrSAz6n+eiXIRtk8/2t/Kyk41Gi9M3A/6o8BQ9VpS7msB/5BW6 4UQPNs36zpTfghSSZSytSmM0GWLd/THyB44jpp082Un1H0vX8qd9cS7lwPQorvTN2c8/ 7tS8u8a9wV1OIc7+J37zRbz0iYIeHxfY2Df/Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5+pmx38ehBoQQKz5nz796/eDuPzRaYHdhEAqorlwh78=; b=dMNjHQhzxVsYqpAMNliDDm2taxzgGQeBaLHnfsHVyGTqkMo4z22MsgIvsi1J/j0NPZ Y2Awau/RiHMQo6FZ4zztvV1HCLgoAxQQcualYHrdhFawU8oiGRB8KLptMs9PbsCxwgnA Od+n6o+J0yQvtLBwgLnxnIfxa1O7fCnC1dxhbPqkgMeXdlIQYGwUylh0SNMG2XwqV/Dc 9v8GRQ4sKWV8w2iE+mNMSQ7M/mHHnoqGwTnhnW1qGItJnryyWXAtfA1i7VgWs4QUak/S 8eQA0ViiQhGVoKjeFQKqp6JMF6k8qKnRLaYQPGuPEAhj+PKdu6v8nLZNIr0wgnMnqs+P 3flQ== X-Gm-Message-State: ALoCoQkhA/0Ct72AN0hueoAAh1bxOh1F0rFfvX3/VFmX0Ii0cWNC46g2yqhe/DSfaAqa5HBCpteR9GD4PTjYMlJ3/KGDp805mA== X-Received: by 10.98.72.135 with SMTP id q7mr55415698pfi.151.1453324621848; Wed, 20 Jan 2016 13:17:01 -0800 (PST) Received: from Soundwave.corp.iodatacenters.com ([72.44.230.13]) by smtp.gmail.com with ESMTPSA id d21sm50789411pfj.32.2016.01.20.13.17.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 20 Jan 2016 13:17:00 -0800 (PST) From: Chris Kankiewicz X-Google-Original-From: Chris Kankiewicz To: alpine-aports@lists.alpinelinux.org Cc: Chris Kankiewicz Subject: [alpine-aports] [PATCH] main/openvpn: fix down script not restoring original resolv.conf Date: Wed, 20 Jan 2016 14:16:58 -0700 Message-Id: <1453324618-23532-1-git-send-email-Chris@ChrisKankiewicz.com> X-Mailer: git-send-email 2.5.0 X-Virus-Scanned: ClamAV using ClamSMTP X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: This patch fixes an error where, in the provided OpenVPN down script, the cp command would fail due to the resolv.conf file already existing. Instead of using cp we cat the file contents over the exising resolv.conf file to avoid the error and preserve any symlinks that may exist. Fixes issue #5027 --- main/openvpn/openvpn.down | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/openvpn/openvpn.down b/main/openvpn/openvpn.down index 1c70db0..ad8910e 100644 --- a/main/openvpn/openvpn.down +++ b/main/openvpn/openvpn.down @@ -13,9 +13,9 @@ if [ "${PEER_DNS}" != "no" ]; then if [ -x /sbin/resolvconf ] ; then /sbin/resolvconf -d "${dev}" elif [ -e /etc/resolv.conf-"${dev}".sv ] ; then - # Important that we copy instead of move incase resolv.conf is + # Important that we cat instead of move incase resolv.conf is # a symlink and not an actual file - cp /etc/resolv.conf-"${dev}".sv /etc/resolv.conf + cat /etc/resolv.conf-"${dev}".sv > /etc/resolv.conf rm -f /etc/resolv.conf-"${dev}".sv fi fi -- 2.5.0 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---