Skip to content

base-files: extra_mounts: Refactoring and error-checking and create ubiblock automatically.

Andreas Gnau requested to merge agnau-extra-mounts-improvements into devel

Best reviewed commit by commit. Inital goal was to add the feature to create ubiblock-devices if the file system is not UBIFS. In the end I did some refactoring and added proper error-checking to the script as well. Everything is grouped into separate commits.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
commit c27613e3603f839b62f94c9ecc2ccc334661f5a1 ┃
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━
Author: Andreas Gnau <andreas.gnau@iopsys.eu>
Date:   Fri Sep 1 15:11:12 2023 +0200

    base-files: extra_mounts: Create ubiblock if needed

    This allows mounting squashfs or EROFS filesystems stored on UBI
    volumes.

    Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
commit 12d6bed21d223068e88b0d5ba5fd6da004e9e2e7 ┃
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━
Author: Andreas Gnau <andreas.gnau@iopsys.eu>
Date:   Fri Sep 1 14:51:58 2023 +0200

    base-files: upgrade: Refactor ubiblock-dev-creation to function

    Refactor creation of /dev/ubiblock* devices into a separate function,
    which can be re-used from other places in the code.

    Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
commit 91bbbdefb029f87ef8a43c2cf130c1f393bfe394 ┃
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━━━━━
Author: Andreas Gnau <andreas.gnau@iopsys.eu>
Date:   Fri Sep 1 14:54:35 2023 +0200

    base-files: extra_mounts: Refactor and error check

    * Refactor the script to a callback-based approach
    * Add error checking for more error situations (fail early)
    * Use boot instead of start because this is not a daemon also for
      correct reporting in procd ubus
    * Return error code to procd when at least on mount fails
    * Make script shfmt and shellcheck clean

    Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>

Merge request reports