Skip to content

Conversation

@palfrey
Copy link
Contributor

@palfrey palfrey commented Sep 20, 2025

Currently, the add-bind-mount code adds something like

    cat > "$unit_path" << UNIT
    [Unit]
    Description=Bind mount $1 over $2
    DefaultDependencies=no
    Conflicts=umount.target
    Before=local-fs.target umount.target

    [Mount]
    What=$1
    Where=$2
    Type=none
    Options=bind

    [Install]
    WantedBy=local-fs.target
    UNIT

    systemctl daemon-reload

with UNIT indented, which gets you errors like

Configuring templatectl.
//opt/lib/opkg/info/templatectl.postinst: line 998: warning: here-document at line 21 delimited by end-of-file (wanted `UNIT')
//opt/lib/opkg/info/templatectl.postinst: line 999: syntax error: unexpected end of file

This PR unindents that.

@Eeems
Copy link
Member

Eeems commented Sep 20, 2025

Instead of adjusting this line to no longer match the formatting of the rest of the file, It would be better to call inspect.cleandoc() in add_method().

@palfrey
Copy link
Contributor Author

palfrey commented Sep 20, 2025

Instead of adjusting this line to no longer match the formatting of the rest of the file, It would be better to call inspect.cleandoc() in add_method().

Hadn't seen that method before actually! Tested it locally, seems to resolve the problem.

@Eeems Eeems merged commit b4ff5ab into toltec-dev:main Sep 20, 2025
11 checks passed
@palfrey palfrey deleted the add-bind-mount-indent branch September 20, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants