From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Jason@zx2c4.com Received: from krantz.zx2c4.com (localhost [127.0.0.1]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id a96b1671 for ; Tue, 27 Jun 2017 10:49:04 +0000 (UTC) Received: from frisell.zx2c4.com (frisell.zx2c4.com [192.95.5.64]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 39859e05 for ; Tue, 27 Jun 2017 10:49:04 +0000 (UTC) Date: Tue, 27 Jun 2017 13:05:32 +0200 From: "Jason A. Donenfeld" To: wireguard@wut.to Subject: Re: making wireguard work on RHEL7/etc. Message-ID: <20170627110530.GC3026@zx2c4.com> References: <87o9tbuq7a.fsf@correspondwith.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: Cc: WireGuard mailing list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Jun 26, 2017 at 09:45:14PM +0100, wireguard@wut.to wrote: > another fix for RHEL7/etc., the version of bash included doesn't support > 'local -n' (neither does Amazon AMI Linux either) > > diff --git a/src/tools/wg-quick.bash b/src/tools/wg-quick.bash > index 6edcd3a..afec996 100755 > --- a/src/tools/wg-quick.bash > +++ b/src/tools/wg-quick.bash > @@ -54,7 +54,7 @@ parse_options() { > } > > read_bool() { > - local -n out="$1" > + local out="$1" > case "$2" in > true) out=1 ;; > false) out=0 ;; > Before removing `-n`, did you even read the bash man page to learn what it did? Things are most certainly broken with this patch, and the config option that uses this will no longer do anything. Nack.