would something along that shown below be suitable?
$ cat ipv4settings.txt
ipv4.gateway: 192.168.2.1
ipv4.routes: --
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
$ cat fixme.awk
{printf("%s=\"%s\"\n",$1,gensub(/ {2,}/,"","g",$2))}
$ awk -F: -f fixme.awk ipv4settings.txt
ipv4.gateway="192.168.2.1"
ipv4.routes="--"
ipv4.route-metric="-1"
ipv4.route-table="0 (unspec)"