git: DragonFly_RELEASE_6_4 installer(8): Refactor vars handling to avoid writing duplicates
Aaron LI
aly at crater.dragonflybsd.org
Tue Feb 24 03:38:37 PST 2026
commit 85a02fc7104cae7c2e55ce7295402325af9d5bf7
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/85a02fc7104cae7c2e55ce7295402325af9d5bf7
--
DragonFly BSD source repository
More information about the Commits
mailing list