dermotbradley / create-alpine-disk-image

Create cloud-init enabled Alpine disk images for physical machines (PCs & RPIs), VMs, and Cloud servers
GNU General Public License v2.0
93 stars 11 forks source link

`/bin/sh: syntax error: unexpected "}"` when building for v3.18 and `sudo` #47

Closed ShaneMcC closed 1 year ago

ShaneMcC commented 1 year ago

When attempting to build for v3.18 using sudo rather than doas, the script fails with:

/bin/sh: syntax error: unexpected "}"

This is because additional_os_configuration() generates an empty section:

write_log "Doing additional OS configuration"
{
}

Moving the write_log line inside the {} section resolves the problem.

dermotbradley commented 1 year ago

Yeah I'd missed this as I hadn't tested sudo for a while (Alpine prefers doas to sudo these days).

Fixed in the most recent PR merged.