mirror of
https://github.com/BigfootACA/arch-image-builder.git
synced 2024-09-21 16:50:53 +08:00
Compare commits
No commits in common. "3a5b7d74ada53615b0eb564271752b2eb489448f" and "be0624f9475caf11dbd61e360fe1f426c8e16514" have entirely different histories.
3a5b7d74ad
...
be0624f947
@ -112,12 +112,12 @@ def build_rootfs(ctx: ArchBuilderContext):
|
|||||||
# real install all packages
|
# real install all packages
|
||||||
pacman_build.proc_pacman(ctx, pacman)
|
pacman_build.proc_pacman(ctx, pacman)
|
||||||
|
|
||||||
# reload user databases after install packages
|
|
||||||
ctx.reload_passwd()
|
|
||||||
|
|
||||||
# running add files hooks (for user settings)
|
# running add files hooks (for user settings)
|
||||||
filesystem.add_files_all(ctx, "pre-user")
|
filesystem.add_files_all(ctx, "pre-user")
|
||||||
|
|
||||||
|
# reload user databases after install packages
|
||||||
|
ctx.reload_passwd()
|
||||||
|
|
||||||
# create custom users and groups
|
# create custom users and groups
|
||||||
user.proc_usergroup(ctx)
|
user.proc_usergroup(ctx)
|
||||||
|
|
||||||
|
@ -71,5 +71,8 @@ def parse_user_from(
|
|||||||
gid = parse_usergroup_from(ctx, node, True, gid)
|
gid = parse_usergroup_from(ctx, node, True, gid)
|
||||||
if gid == -1:
|
if gid == -1:
|
||||||
user = ctx.passwd.lookup_uid(uid)
|
user = ctx.passwd.lookup_uid(uid)
|
||||||
gid = user.gid if user else uid
|
if user is None: raise ArchBuilderConfigError(
|
||||||
|
f"user {user} not found"
|
||||||
|
)
|
||||||
|
gid = user.gid
|
||||||
return uid, gid
|
return uid, gid
|
||||||
|
Loading…
Reference in New Issue
Block a user