git: DragonFly_RELEASE_6_4 nrelease: Improve 'etc.hdd' creation to eliminate inconsistency

Aaron LI aly at crater.dragonflybsd.org
Sun Apr 27 18:09:51 PDT 2025


commit 745cd276ca1d68548e91651672301200ad4aeae1
Author: Aaron LI <aly at aaronly.me>
Date:   Wed Feb 8 22:39:47 2023 +0800

    nrelease: Improve 'etc.hdd' creation to eliminate inconsistency
    
    Previously, the 'etc.hdd' was created during the 'buildiso' target and
    then updated in the 'pkgs' target.  However, in the 'pkgs' target, only
    the password files (i.e., master.passwd, passwd, group) were copied but
    the password DBs (i.e., pwd.db, spwd.db) were not rebuild.  This caused
    an inconsistency in 'etc.hdd'.  When a user tried manual installation
    and forgot to run 'pwd_mkdb', the installed system would fail to add new
    users and generate errors like:
    
    > pw: user 'myuser' disappeared during update.
    > adduser: ERROR: There was an error adding user (myuser).
    
    This commit improves the creation of 'etc.hdd'.  Reorder the 'customiso'
    target *after* the 'pkgs' target, so we can simply copy the 'etc' to
    'etc.hdd' and be done, without any further changes, and the resulting
    password files and DBs are in consistency.  In addition, this avoids
    adding the 'installer' user to the 'etc.hdd' and so we get a cleaner
    system by default.
    
    See also: https://lists.dragonflybsd.org/pipermail/users/2023-February/428576.html
    (Regenerating the password databases on new installs)

Summary of changes:
 nrelease/Makefile | 23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/745cd276ca1d68548e91651672301200ad4aeae1


-- 
DragonFly BSD source repository


More information about the Commits mailing list