POSIX syntax for several scripts
Summary
While building and testing WW4 under Ubuntu 22.04 LTS and 24.04 LTS, it was discovered that several scripts broke due to Ubuntu/Debian use of /bin/dash instead of /bin/bash for /bin/sh. The scripts are:
overlays/wwinit/rootfs/warewulf/wwinit overlays/wwinit/rootfs/init scripts/build-ipxe.sh
Rationale
Since Ubuntu and Debian both use dash, POSIX compliance is warranted. A simple workaround would be to force the use of bash, however, POSIX compliance is preferred in the event that bash is not available on the system, or some other environment requires it.
Description
I have modified versions of the aforementioned scripts for POSIX compliance. Additionally, I have added commented out logic in the wwinit script to facilitate testing for the .sh suffix and exec bit on the scripts launched should that become needed.
Additional information
No response
General information
- [X] I have searched the issues of this repo and believe this is not a duplicate
@iankgt40 thank you so much for this work, and for getting the PR submitted.
@iankgt40 I wasn't paying enough attention: this is an issue, not a PR, and your updated scripts are not attached.
Can you submit a PR with the updated scripts?
Sure thing ... will do so shortly.
Ian
Ian Kaufman Systems Integration Engineer UC San Diego, Research IT Services ikaufman AT ucsd DOT edu
From: Jonathon Anderson @.> Sent: Wednesday, October 30, 2024 8:41 AM To: warewulf/warewulf @.> Cc: Kaufman, Ian @.>; Mention @.> Subject: Re: [warewulf/warewulf] POSIX syntax for several scripts (Issue #1464)
@iankgt40https://urldefense.com/v3/__https://github.com/iankgt40__;!!Mih3wA!C0SAHc_szQf9nmmRRNxuNN0Dsa9QId4GMzNrLAFzfStklvIqfuuOL0ZXnDH2hWtXEVtlaJw0IIo1qDJc2EB6yV1t$ I wasn't paying enough attention: this is an issue, not a PR, and your updated scripts are not attached.
Can you submit a PR with the updated scripts?
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/warewulf/warewulf/issues/1464*issuecomment-2447586027__;Iw!!Mih3wA!C0SAHc_szQf9nmmRRNxuNN0Dsa9QId4GMzNrLAFzfStklvIqfuuOL0ZXnDH2hWtXEVtlaJw0IIo1qDJc2JcbP3qd$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AEWOCUIMKK5KFQ3FWJ6SBVLZ6D42XAVCNFSM6AAAAABQNNL2PWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBXGU4DMMBSG4__;!!Mih3wA!C0SAHc_szQf9nmmRRNxuNN0Dsa9QId4GMzNrLAFzfStklvIqfuuOL0ZXnDH2hWtXEVtlaJw0IIo1qDJc2EDy9xlx$. You are receiving this because you were mentioned.Message ID: @.***>
Hmmm, PR denied since I am not a "collaborator" ...
Ian Kaufman Systems Integration Engineer UC San Diego, Research IT Services ikaufman AT ucsd DOT edu
From: Jonathon Anderson @.> Sent: Wednesday, October 30, 2024 8:41 AM To: warewulf/warewulf @.> Cc: Kaufman, Ian @.>; Mention @.> Subject: Re: [warewulf/warewulf] POSIX syntax for several scripts (Issue #1464)
@iankgt40https://urldefense.com/v3/__https://github.com/iankgt40__;!!Mih3wA!C0SAHc_szQf9nmmRRNxuNN0Dsa9QId4GMzNrLAFzfStklvIqfuuOL0ZXnDH2hWtXEVtlaJw0IIo1qDJc2EB6yV1t$ I wasn't paying enough attention: this is an issue, not a PR, and your updated scripts are not attached.
Can you submit a PR with the updated scripts?
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/warewulf/warewulf/issues/1464*issuecomment-2447586027__;Iw!!Mih3wA!C0SAHc_szQf9nmmRRNxuNN0Dsa9QId4GMzNrLAFzfStklvIqfuuOL0ZXnDH2hWtXEVtlaJw0IIo1qDJc2JcbP3qd$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AEWOCUIMKK5KFQ3FWJ6SBVLZ6D42XAVCNFSM6AAAAABQNNL2PWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBXGU4DMMBSG4__;!!Mih3wA!C0SAHc_szQf9nmmRRNxuNN0Dsa9QId4GMzNrLAFzfStklvIqfuuOL0ZXnDH2hWtXEVtlaJw0IIo1qDJc2EDy9xlx$. You are receiving this because you were mentioned.Message ID: @.***>
Anyone can submit a PR. You just can't push a branch into the Warewulf project: fork the repo into your account, push a branch there, and submit the PR from there.
Done!
Ian Kaufman Systems Integration Engineer UC San Diego, Research IT Services ikaufman AT ucsd DOT edu
From: Jonathon Anderson @.> Sent: Wednesday, October 30, 2024 9:22 AM To: warewulf/warewulf @.> Cc: Kaufman, Ian @.>; Mention @.> Subject: Re: [warewulf/warewulf] POSIX syntax for several scripts (Issue #1464)
Anyone can submit a PR. You just can't push a branch into the Warewulf project: fork the repo into your account, push a branch there, and submit the PR from there.
— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/warewulf/warewulf/issues/1464*issuecomment-2447707038__;Iw!!Mih3wA!GBCgZ5GypYPuITb4s3LyYzOVTbaWB11fSil81QfrN2RXLqJ4PMjr2DIzWjtjXYuanfqq7SGohV9kMB8_6xjEnWGu$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AEWOCUN5XXNVYUSTFIE7OSDZ6EBWFAVCNFSM6AAAAABQNNL2PWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBXG4YDOMBTHA__;!!Mih3wA!GBCgZ5GypYPuITb4s3LyYzOVTbaWB11fSil81QfrN2RXLqJ4PMjr2DIzWjtjXYuanfqq7SGohV9kMB8_624mIJD9$. You are receiving this because you were mentioned.Message ID: @.***>