Skip to content

Commit

Permalink
bin/ubuntu-core-initramfs: create /etc for ldconfig
Browse files Browse the repository at this point in the history
ldconfig assumes /etc exists and fails otherwise. This issue started
to happen on oracular because in the past previous steps already
created /etc.
  • Loading branch information
alfonsosanchezbeato committed Aug 13, 2024
1 parent f810248 commit b0460f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/ubuntu-core-initramfs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,9 @@ def install_misc(dest_dir, sysroot):
if sysroot != "/":
cmd += ["-r", sysroot]
check_call(cmd + to_resolve, env=proc_env)
# Build ld cache
# Build ld cache (make sure /etc is there before)
etc_d = os.path.join(dest_dir, "etc")
os.makedirs(etc_d, exist_ok=True)
check_call(["ldconfig", "-r", dest_dir])

# /sbin/modprobe is a static path in the kernel
Expand Down

0 comments on commit b0460f5

Please sign in to comment.