Gentoo Archives: gentoo-user

From: Alexander Kapshuk <alexander.kapshuk@×××××.com>
To: Gentoo mailing list <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] profile-sync-daemon "bad substitution" at boot
Date: Thu, 06 Sep 2018 08:18:58
Message-Id: CAJ1xhMVuGdcXdODsghKm5-gcUf=hi1qZOixTUR89=sPY5gKquw@mail.gmail.com
In Reply to: Re: [gentoo-user] profile-sync-daemon "bad substitution" at boot by Samuraiii
1 On Thu, Sep 6, 2018 at 10:48 AM Samuraiii <samurai.no.dojo@×××××.com> wrote:
2 >
3 > On 5.9.2018 21:20, Mick wrote:
4 >
5 > Hi All,
6 >
7 > I just noticed a psd error at boot time:
8 >
9 > /usr/bin/profile-sync-daemon: line 325: ${#DIRArr[@]##*/}: bad substitution
10 >
11 > Any idea what's brought this about?
12 >
13 > Hi,
14 >
15 > my bet is that your /bin/sh != /bin/bash and /usr/bin/profile-sync-daemon starts with #!/bin/sh.
16 >
17 > The other way around /usr/bin/profile-sync-daemon contains bashishms.
18 >
19 > You can try (as a test) to change #!/bin/sh for #!/bin/bash...
20 >
21 > S
22
23 The shebang in the master repository is '#!/bin/bash'.
24 https://raw.githubusercontent.com/graysky2/profile-sync-daemon/master/common/profile-sync-daemon.in
25
26 The error message is a shell parameter expansion syntax error, which
27 comprises two different expansion constructs referenced below.
28 ${#parameter}
29 String Length.
30
31 ${parameter##[word]}
32 Remove Largest Prefix Pattern.
33
34 See section 2.6.2 Parameter Expansion,
35 http://pubs.opengroup.org/onlinepubs/9699919799/nframe.html.
36
37 The script in the master repository referenced above does not contain
38 the line in question. It has '${#DIRArr[@]/}' and '${DIRArr[@]##*/}'.

Replies

Subject Author
Re: [gentoo-user] profile-sync-daemon "bad substitution" at boot Alexander Kapshuk <alexander.kapshuk@×××××.com>