Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install to internal storage - calling armbian-install script #48

Merged
merged 2 commits into from
Sep 1, 2024

Conversation

igorpecovnik
Copy link
Member

@igorpecovnik igorpecovnik commented Aug 31, 2024

Description

As title says.

Implementation Details

Simple command execution. armbian-install is a part of BSP. Must be present ... do we need to check for presence?

Testing Procedure

  • It opens and returns to armbian-config as expected

Checklist

  • My code follows the style guidelines of this project
  • Changes have been tested and verified
  • I have included necessary metadata in the code, including associative arrays

igorpecovnik and others added 2 commits August 31, 2024 17:49
Copy link
Member

@Tearran Tearran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added "condition": "[[ -n $(ls /sbin/armbian-install) ]]"

Shows menu if armbian-install is present

to test renamed armbian-install.back does not show in menu.

@Tearran Tearran self-assigned this Aug 31, 2024
@Tearran
Copy link
Member

Tearran commented Aug 31, 2024

Alternatively if there is an easy cli way to install armbian-install
we can check if nvme or a 2nd mmc is available before showing menu and prompt user to install armbian-install if not present.

#!/bin/bash

check_storage_devices() {
    local emmc_found=false
    local nvme_found=false

    # Check for eMMC devices (exclude boot partitions like mmcblk1boot0 and mmcblk1boot1)
    if lsblk -d -n -o NAME | grep -E '^mmcblk[1-9]$' > /dev/null; then
        emmc_found=true
    fi

    # Check for NVMe devices
    if lsblk -d -n -o NAME,MODEL | grep -E -i 'nvme' > /dev/null; then
        nvme_found=true
    fi

     echo $nvme_found

}

can check if an available device to install is available before showing menu item

"condition": "check_storage_devices"

@igorpecovnik
Copy link
Member Author

Alternatively if there is an easy cli way to install armbian-install

armbian-install is part of board support package, installed always.

we can check if nvme or a 2nd mmc

It is more complicated ... i wouldn't bother with conditioning here.

@Tearran Tearran merged commit 3808298 into main Sep 1, 2024
1 check passed
@Tearran Tearran deleted the internal branch September 1, 2024 02:27
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