Skip to content

Commit

Permalink
Merge branch 'main' into network
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik authored Sep 5, 2024
2 parents 765c5ef + be4df8e commit 5ed24bc
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ sudo armbian-config
- **S07** - Manage SSH login options
- **S08** - Change shell system wide to BASH
- **S09** - Change shell system wide to ZSH
- **S10** - Switch to rolling release
- **S11** - Switch to stable release


- ## **Network**
Expand Down Expand Up @@ -96,6 +98,8 @@ Usage: armbian-configng [option] [arguments]
--cli S07 - Manage SSH login options
--cli S08 - Change shell system wide to BASH
--cli S09 - Change shell system wide to ZSH
--cli S10 - Switch to rolling release
--cli S11 - Switch to stable release
--cli N00 - Install Bluetooth support
--cli N01 - Remove Bluetooth support
--cli N02 - Bluetooth Discover
Expand Down
26 changes: 26 additions & 0 deletions lib/armbian-configng/config.ng.jobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,32 @@
"src_reference": "",
"author": "https://github.com/igorpecovnik",
"condition": "[[ $(cat /etc/passwd | grep \"^root:\" | rev | cut -d\":\" -f1 | cut -d\"/\" -f1| rev) == \"bash\" ]]"
},
{
"id": "S10",
"description": "Switch to rolling release",
"command": [
"get_user_continue \"This will switch to rolling releases\n\nwould you like to continue?\" process_input",
"set_rolling"
],
"status": "Active",
"doc_link": "",
"src_reference": "https://github.com/armbian/config/blob/master/debian-config-jobs#L1446",
"author": "Igor Pecovnik",
"condition": "grep -q 'apt.armbian.com' /etc/apt/sources.list.d/armbian.list"
},
{
"id": "S11",
"description": "Switch to stable release",
"command": [
"get_user_continue \"This will switch to stable releases\n\nwould you like to continue?\" process_input",
"set_stable"
],
"status": "Active",
"doc_link": "",
"src_reference": "https://github.com/armbian/config/blob/master/debian-config-jobs#L1446",
"author": "Igor Pecovnik",
"condition": "grep -q 'beta.armbian.com' /etc/apt/sources.list.d/armbian.list"
}

]
Expand Down
37 changes: 37 additions & 0 deletions lib/armbian-configng/config.ng.system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,40 @@ function qr_code (){
read -n 1 -s -r -p "Press any key to continue"

}


module_options+=(
["set_stable,author"]="Tearran"
["set_stable,ref_link"]="https://github.com/armbian/config/blob/master/debian-config-jobs#L1446"
["set_stable,feature"]="set_stable"
["set_stable,desc"]="Set Armbian to stable release"
["set_stable,example"]="set_stable"
["set_stable,status"]="Active"
)
#
# @description Set Armbian to stable release
#
function set_stable () {

if ! grep -q 'apt.armbian.com' /etc/apt/sources.list.d/armbian.list; then
sed -i "s/http:\/\/[^ ]*/http:\/\/apt.armbian.com/" /etc/apt/sources.list.d/armbian.list
fi
}

module_options+=(
["set_rolling,author"]="Tearran"
["set_rolling,ref_link"]="https://github.com/armbian/config/blob/master/debian-config-jobs#L1446"
["set_rolling,feature"]="set_rolling"
["set_rolling,desc"]="Set Armbian to rolling release"
["set_rolling,example"]="set_rolling"
["set_rolling,status"]="Active"
)
#
# @description Set Armbian to rolling release
#
function set_rolling () {

if ! grep -q 'beta.armbian.com' /etc/apt/sources.list.d/armbian.list; then
sed -i "s/http:\/\/[^ ]*/http:\/\/beta.armbian.com/" /etc/apt/sources.list.d/armbian.list
fi
}

0 comments on commit 5ed24bc

Please sign in to comment.