diff --git a/vhclient/config.yaml b/vhclient/config.yaml index 238f98b..9493b6d 100644 --- a/vhclient/config.yaml +++ b/vhclient/config.yaml @@ -1,5 +1,5 @@ name: VirtualHere Client -version: "0.1.331" +version: "0.1.332" slug: vhclient description: VirtualHere Client arch: diff --git a/vhclient/rootfs/usr/bin/vh_editini b/vhclient/rootfs/usr/bin/vh_editini index dedd140..6c39511 100755 --- a/vhclient/rootfs/usr/bin/vh_editini +++ b/vhclient/rootfs/usr/bin/vh_editini @@ -3,24 +3,4 @@ file="/config/vhclient.ini" touch $file -editini() { - awk -f - BEGIN { - section = $1; - key = $2; - value = $3; - found_section = false; - } - - /^\[$section\]/ { - found_section = true; - } - - END { - print "Found section: $found_section"; - } - $file -} - -editini $1 $2 $3 - +awk -f vh_editini.awk -v section=$1 -v key=$2 -v value=$3 $file diff --git a/vhclient/rootfs/usr/bin/vh_editini.awk b/vhclient/rootfs/usr/bin/vh_editini.awk new file mode 100755 index 0000000..ae385d6 --- /dev/null +++ b/vhclient/rootfs/usr/bin/vh_editini.awk @@ -0,0 +1,13 @@ +#!/usr/bin/awk -f + +BEGIN { + found_section = false; +} + +0$ ~ "^\[" $section { + found_section = true; +} + +END { + print "Found section: $found_section"; +}