From 92bd8eb814a09624de3dd31fb7d1fed0764fa033 Mon Sep 17 00:00:00 2001 From: alexloss Date: Wed, 10 Mar 2021 17:43:03 +0100 Subject: [PATCH] Shorthand func to modify /boot/config.txt --- src/common.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/common.sh b/src/common.sh index 686d893a..d849f207 100755 --- a/src/common.sh +++ b/src/common.sh @@ -461,3 +461,8 @@ function copy_and_export_folder(){ cp -va $@ | awk -F "' -> '" '{print substr($2, 1, length($2)-1)}' | xargs -d"\n" -t bash -x -c 'custompios_export '${OUTPUT}' "$@"' _ } +function set_config_var() { + # Set a value for a specific variable in /boot/config.txt + # See https://github.com/RPi-Distro/raspi-config/blob/master/raspi-config#L231 + raspi-config nonint set_config_var $1 $2 /boot/config.txt +}