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 97B7E138334 for ; Thu, 6 Sep 2018 08:18:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 848CEE07EA; Thu, 6 Sep 2018 08:18:50 +0000 (UTC) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (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 CFBCCE07B2 for ; Thu, 6 Sep 2018 08:18:49 +0000 (UTC) Received: by mail-it0-x229.google.com with SMTP id h20-v6so13068692itf.2 for ; Thu, 06 Sep 2018 01:18:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=n6XzcEQFrJTU8XoSkQx+nAYB1HJAgPoq2+X0RhM9N14=; b=Hgprc6bCNqRBdKWfXbYJBP+ruGJYPWWYY186Ki+KDvz9ID0SQQLiN712BypTVgQfHK VXQFpyUAJopLXpyqnfNRbsHVC6aOlieaNVgZDfCrSJ3M7cOhN8pwqXK2K/Cl5qE32wab h10O4UX/6rhUk1hWP0jDRS2JqOhgI08wvl4mhI5HIIm7ctB6vZJXs8Uz+LuEJG2e2PmX nCgqemldMtC7C4dKXEKN7pbc4AWLvxxlsxJUTKSpeOnufZeqUsnWh9a95pY4b6CgEnAq w1cUgMCmS6fJoOMnxP7aKLGZ0giOxE0Il/dQwm+miEXB9H1MyiyGnz/BfBs/07hMNxzr TZfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=n6XzcEQFrJTU8XoSkQx+nAYB1HJAgPoq2+X0RhM9N14=; b=kd5pqVHFW4nQdQ/vbGx5ybf7VTBN9c+NNXy8+P1i13vfeIeE1wwbCjmwAoLVih8LOT jo4M9JcSeW3UcCd3W/Fg+lbSHcTjqVMP7gxHkaKEvSnGG0c7V55B0qCfeg6tbsVRQHLa owm3lsNClFEYEYRMM8K0NvOzy+2mhXgj5mdPUtfaQIhYKPdDLqLs/4GkyVNkC8rmvwEa fIx5OKJfqTf2U0QZoI+f7Opc0lXK4FFuASqKjFnv5HzWTg4bdQIr3B7hO8O+tEYq0zRb /uME353YsJkBUnROpUoVKGRA2srSJSOOyvahY5D57XE47Ns9wpDW+SOokkMnnykhz+k8 pL3A== X-Gm-Message-State: APzg51B0J+E8g4C+PUeTf9kEX20D5rwxQPaKMN34twKTmR/5LWheezKX DrNRH3cQAiA/uaoFNtz0VBoHty4HFBlDiwqmBPc3UtMx X-Google-Smtp-Source: ANB0VdYu9eIju4NYiRlCNQeEHHKJpKAwgVBpqzDgdoe33Yp3IDgUXLg/AVdXG4HnVt8Nx0/LfNNxZ7Pzah93Qeb8DSA= X-Received: by 2002:a24:3a88:: with SMTP id m130-v6mr1520966itm.151.1536221928253; Thu, 06 Sep 2018 01:18:48 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 References: <33402941.Na0mpORmax@dell_xps> In-Reply-To: From: Alexander Kapshuk Date: Thu, 6 Sep 2018 11:18:12 +0300 Message-ID: Subject: Re: [gentoo-user] profile-sync-daemon "bad substitution" at boot To: Gentoo mailing list Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 2e55fcb6-6b89-4c29-88f9-cf6fc3d4efb2 X-Archives-Hash: bd2208f010829b7821f8b29c4621f86b On Thu, Sep 6, 2018 at 10:48 AM Samuraiii wrote: > > On 5.9.2018 21:20, Mick wrote: > > Hi All, > > I just noticed a psd error at boot time: > > /usr/bin/profile-sync-daemon: line 325: ${#DIRArr[@]##*/}: bad substitution > > Any idea what's brought this about? > > Hi, > > my bet is that your /bin/sh != /bin/bash and /usr/bin/profile-sync-daemon starts with #!/bin/sh. > > The other way around /usr/bin/profile-sync-daemon contains bashishms. > > You can try (as a test) to change #!/bin/sh for #!/bin/bash... > > S The shebang in the master repository is '#!/bin/bash'. https://raw.githubusercontent.com/graysky2/profile-sync-daemon/master/common/profile-sync-daemon.in The error message is a shell parameter expansion syntax error, which comprises two different expansion constructs referenced below. ${#parameter} String Length. ${parameter##[word]} Remove Largest Prefix Pattern. See section 2.6.2 Parameter Expansion, http://pubs.opengroup.org/onlinepubs/9699919799/nframe.html. The script in the master repository referenced above does not contain the line in question. It has '${#DIRArr[@]/}' and '${DIRArr[@]##*/}'.