From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1442013835A for ; Tue, 5 Jan 2021 12:46:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 167E6E083B; Tue, 5 Jan 2021 12:46:07 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EFBE3E083B for ; Tue, 5 Jan 2021 12:46:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F0670341105 for ; Tue, 5 Jan 2021 12:46:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 61B76CC for ; Tue, 5 Jan 2021 12:46:04 +0000 (UTC) From: "Lars Wendler" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" Message-ID: <1609850645.04e6565b185fd3066822333e1b1932284ec1f6b7.polynomial-c@OpenRC> Subject: [gentoo-commits] proj/netifrc:master commit in: net/ X-VCS-Repository: proj/netifrc X-VCS-Files: net/dhcpcd.sh X-VCS-Directories: net/ X-VCS-Committer: polynomial-c X-VCS-Committer-Name: Lars Wendler X-VCS-Revision: 04e6565b185fd3066822333e1b1932284ec1f6b7 X-VCS-Branch: master Date: Tue, 5 Jan 2021 12:46:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: aa1ecb93-6791-4ab6-a1a4-88126eb19b9d X-Archives-Hash: 21caafcd9967514f448b29482a54c01e commit: 04e6565b185fd3066822333e1b1932284ec1f6b7 Author: Lars Wendler gentoo org> AuthorDate: Tue Dec 15 19:53:27 2020 +0000 Commit: Lars Wendler gentoo org> CommitDate: Tue Jan 5 12:44:05 2021 +0000 URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=04e6565b net/dhcpcd.sh: Remove support for ancient dhcpcd versions Signed-off-by: Lars Wendler gentoo.org> net/dhcpcd.sh | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/net/dhcpcd.sh b/net/dhcpcd.sh index 548a503..e3410d8 100644 --- a/net/dhcpcd.sh +++ b/net/dhcpcd.sh @@ -20,7 +20,7 @@ dhcpcd_start() # alter the pidfile's name (#718114) # Save the args into a file so dhcpcd_stop can later re-use the very # same args later. - local args= opt= pidfile= opts= new=true argsfile=/run/netifrc_dhcpcd_${IFACE}_args + local args= opt= pidfile= opts= argsfile=/run/netifrc_dhcpcd_${IFACE}_args eval args=\$dhcpcd_${IFVAR} [ -z "${args}" ] && args=${dhcpcd} echo "${args}" > ${argsfile} @@ -30,33 +30,24 @@ dhcpcd_start() eval opts=\$dhcp_${IFVAR} [ -z "${opts}" ] && opts=${dhcp} - case "$(dhcpcd --version)" in - "dhcpcd "[123]*) new=false;; + case "$(dhcpcd --version | head -n 1)" in + "dhcpcd "[123]*) + eerror 'The dhcpcd version is too old. Please upgrade.' + return 1 + ;; esac # Map some generic options to dhcpcd for opt in ${opts}; do case "${opt}" in nodns) - if ${new}; then - args="${args} -C resolv.conf" - else - args="${args} -R" - fi + args="${args} -C resolv.conf" ;; nontp) - if ${new}; then - args="${args} -C ntp.conf" - else - args="${args} -N" - fi + args="${args} -C ntp.conf" ;; nonis) - if ${new}; then - args="${args} -C yp.conf" - else - args="${args} -Y" - fi + args="${args} -C yp.conf" ;; nogateway) args="${args} -G";; nosendhost) args="${args} -h ''";