AWS ami /etc/profile.d/path.sh: Syntax error: "(" unexpected

Bug #2047703 reported by Ubuntu user
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
New
Undecided
Unassigned

Bug Description

aws-parallelcluster-3.8.0-ubuntu-2204-lts-hvm-x86_64-202312160956 2023-12-16T10-00-45.861Z

ami-0b3fd4465f19a9981

During AWS parallelcluster creation, the following error was captured during execution of a
HeadNode.CustomAction.OnNodeConfigured.Script:

-sh: 3: /etc/profile.d/path.sh: Syntax error: "(" unexpected

For reference:
============================
$ cat /etc/profile.d/path.sh
#!/bin/bash

PATH_REQUIRED_DIRECTORIES=(/usr/local/sbin /usr/local/bin /sbin /bin /usr/sbin /usr/bin /opt/aws/bin)

for directory in "${PATH_REQUIRED_DIRECTORIES[@]}"; do
    [[ ":$PATH:" == *":$directory:"* ]] || PATH="${PATH:+"$PATH:"}$directory"
done

export PATH
============================

The script's syntax seems to be compatible with bash, but incompatible with sh.

description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Libera.chat.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/2047703/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.