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

[Feature Request]: check/ck_os_version: check if os version is not less than given value #77

Open
1 task done
aronchanisme opened this issue Oct 22, 2024 · 0 comments
Assignees
Labels
priority/p-1 priority p-1 type/feature propose a new feature request
Milestone

Comments

@aronchanisme
Copy link
Collaborator

Is there an existing issue for the feature request?

  • I have checked the existing issues.

Feature Description

check/ck_os_version: check if os version is not less than given value

usage: 
check/ck_os_version.sh <os_version>, where,
os_version: e.g. 12.0

example:
check/ck_os_version.sh 12.0

output:
return 0: if os version is not less than given value
return 1:  if os version is less than given value, or invalid usage

Feature Implementation

Linux:

  • Debian: os_version=cat /etc/debian_version
  • CentOS/TencentOS: os_version=cat /etc/centos-release | awk '{print $4}'
  • Others: os_version=grep "^VERSION_ID=" /etc/os-release | awk -F "=" '{print $2}' | sed 's#"##g'

Mac: os_version=sw_vers | grep "ProductVersion" | awk '{print $2}'

Additional information

No response

@aronchanisme aronchanisme added priority/p-1 priority p-1 type/feature propose a new feature request labels Oct 22, 2024
@aronchanisme aronchanisme added this to the mo_ctl 2.0 milestone Oct 22, 2024
@aronchanisme aronchanisme self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/p-1 priority p-1 type/feature propose a new feature request
Projects
None yet
Development

No branches or pull requests

1 participant