File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 2026-01-22]
9+ ### Changed:
10+ - The install-afc.sh script will now allow users to install as root if it detects the user is running a SAF K1 environment.
11+
812## [ 2026-01-15]
913### Added:
1014- The afc-debug.sh script will now upload the AFC statistics from moonraker for easier troubleshooting.
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ check_root() {
2424 # If the script is run as root, it prints an error message and exits with status 1.
2525 # This is to ensure the script is run by a normal user for security reasons.
2626
27+ check_for_k1
28+ # On K1 OS, allow running as root but warn the user instead of exiting.
29+ if [ " $is_k1_os " == " True" ] && [ " $EUID " -eq 0 ]; then
30+ print_msg WARNING " K1 OS detected, skipping root user check."
31+ return
32+ fi
2733 if [ " $EUID " -eq 0 ]; then
2834 print_msg ERROR " Do not run as root, use a normal user"
2935 exit 1
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ installation_options=("BoxTurtle (4-Lane)" "BoxTurtle (8-Lane)" "NightOwl" "HTLF
3737invalid_name=" False"
3838minimum_python_major=" 3"
3939minimum_python_minor=" 8"
40+ is_k1_os=" False"
4041
4142# AFC default configs
4243park_macro=" True"
Original file line number Diff line number Diff line change @@ -219,4 +219,10 @@ del_var_file() {
219219 fi
220220 fi
221221 export unit_message
222+ }
223+
224+ check_for_k1 () {
225+ if grep -Fqs " ID=buildroot" /etc/os-release; then
226+ is_k1_os=" True"
227+ fi
222228}
Original file line number Diff line number Diff line change @@ -60,13 +60,12 @@ main() {
6060 moonraker_config_file=" ${printer_config_dir} /moonraker.conf"
6161 afc_path=" $HOME /AFC-Klipper-Add-On"
6262
63-
6463 # Make sure necessary directories exist
65- echo " Ensuring we are not running as root.."
64+ echo " Ensuring we are not running as root (except on K1 OS). .."
6665 check_root
67- echo " Ensuring no conflicting software is present.."
66+ echo " Ensuring no conflicting software is present... "
6867 check_for_hh
69- echo " Checking to ensure crudini and jq are present.."
68+ echo " Checking to ensure crudini and jq are present... "
7069 check_for_prereqs
7170 if [ " $test_mode " == " False" ]; then
7271 check_python_version
You can’t perform that action at this time.
0 commit comments