diff --git a/tools/ak2-core.sh b/tools/ak2-core.sh index 0b7de80..8a03e17 100755 --- a/tools/ak2-core.sh +++ b/tools/ak2-core.sh @@ -302,5 +302,15 @@ patch_cmdline() { fi; } +# patch_prop +patch_prop() { + if [ -z "$(grep "^$2=" $1)" ]; then + echo -ne "\n$2=$3\n" >> $1; + else + line=`grep -n "^$2=" $1 | head -n1 | cut -d: -f1`; + sed -i "${line}s;.*;${2}=${3};" $1; + fi; +} + ## end methods