git: installer(8): Refactor vars handling to avoid writing duplicates
Aaron LI
aly at crater.dragonflybsd.org
Mon Feb 23 23:29:54 PST 2026
commit 77836144e5fad1ea71c381e38d33caea8ba1be66
Author: Aaron LI <aly at aaronly.me>
Date: Thu Feb 19 18:26:41 2026 +0800
installer(8): Refactor vars handling to avoid writing duplicates
config_vars_write() appends the in-memory vars to the target config
file. fn_assign_hostname_domain() fn_assign_ip() previously both read
the 'resolv.conf' and then write the updated vars, resulting duplicate
items being written to 'resolv.conf'.
Refactor the vars handling to start with empty 'rc_conf' and
'resolv_conf' vars, adjust the above configure functions to add/set
variables, and only write the config files once at the end.
Summary of changes:
usr.sbin/installer/dfuibe_installer/flow.c | 55 ++++++---
usr.sbin/installer/dfuibe_installer/fn.h | 1 +
usr.sbin/installer/dfuibe_installer/fn_configure.c | 136 +++++++++------------
usr.sbin/installer/dfuibe_installer/fn_install.c | 8 +-
4 files changed, 105 insertions(+), 95 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/77836144e5fad1ea71c381e38d33caea8ba1be66
--
DragonFly BSD source repository
More information about the Commits
mailing list