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

False "unsupported os version" error on Raspberry Pi #297

Closed
nilstzh opened this issue Aug 6, 2024 · 1 comment
Closed

False "unsupported os version" error on Raspberry Pi #297

nilstzh opened this issue Aug 6, 2024 · 1 comment

Comments

@nilstzh
Copy link

nilstzh commented Aug 6, 2024

During an installation attempt on Raspberry Pi 4B with Raspbian 12 I'm getting the following error:

$ curl -fsSL https://terminus.sh |  bash -

...

2024-08-06 08:01:38.026062993 +0100 [INFO] Precheck and Installing dependencies ...
 

2024-08-06 08:01:38.123529580 +0100 [FATAL] unsupported os version 'Raspberry Pi OS' 

2024-08-06 08:01:38.127421071 +0100 [FATAL] command error occurs, exit with '1' directly 

After inspecting install_cmd.sh I found out that is_raspbian() calls lsb_release with -d (for 'description') flag instead of -r (for 'release'), which is then compared to '11' and '12'.

Code in question:

is_raspbian(){
    rasp=$(uname -a)
    lsb_release=$(lsb_release -d 2>&1 | awk -F'\t' '{print $2}')
    if [ -z "$lsb_release" ]; then
        echo 0
        return
    fi
    if [[ ${lsb_release} == *Raspbian* || ${rasp} == *raspberry* ]];then 
        case "$lsb_release" in
            *11* | *12*)
                echo 1
                ;;
            *)
                echo 0
                ;;
        esac
    else
        echo 0
    fi
}
@pengpeng
Copy link
Contributor

pengpeng commented Aug 6, 2024

@nilstzh thank you. We will release this fix in version 1.7.0.rc.2

@eball eball closed this as completed Dec 13, 2024
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

No branches or pull requests

3 participants