Skip to content

post-fs-data.sh: Create directories with mkdir -p#172

Merged
chenxiaolong merged 1 commit intochenxiaolong:masterfrom
hexdefined:system-ca-certs-mkdir
Feb 3, 2026
Merged

post-fs-data.sh: Create directories with mkdir -p#172
chenxiaolong merged 1 commit intochenxiaolong:masterfrom
hexdefined:system-ca-certs-mkdir

Conversation

@hexdefined
Copy link
Contributor

$mnt_dir was not created with mkdir -p, unlike $mnt_base. This caused the system-ca-certs module to only work for the first boot after it was enabled, since mkdir would fail on subsequent boots.

Log:

+ mod_dir=/data/adb/modules/system_ca_certs
+ module_prop id
+ grep '^id=' /data/adb/modules/system_ca_certs/module.prop
+ cut '-d=' -f2
+ module_id=system_ca_certs
+ apex_dir=/apex/com.android.conscrypt/cacerts
+ system_dir=/system/etc/security/cacerts
+ mnt_base=/data/adb/modules/system_ca_certs/mnt
+ mnt_index=0
+ mkdir -p /data/adb/modules/system_ca_certs/mnt
+ '[[' '!' -d /apex/com.android.conscrypt/cacerts ]]
+ mnt_dir=/data/adb/modules/system_ca_certs/mnt/0
+ let 'mnt_index+=1'
+ mkdir /data/adb/modules/system_ca_certs/mnt/0
mkdir: can't create directory '/data/adb/modules/system_ca_certs/mnt/0': File exists

@chenxiaolong chenxiaolong self-assigned this Feb 3, 2026
Copy link
Owner

@chenxiaolong chenxiaolong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof, that was a dumb oversight on my part.

Thanks for the PR!

@chenxiaolong
Copy link
Owner

chenxiaolong commented Feb 3, 2026

The CI failing is unrelated to your change. It's due to a vulnerability in a dependency. I'll update the dependencies in a separate PR and then rebase this branch.

EDIT: "unrelated", not "related"

`$mnt_dir` was not created with `mkdir -p`, unlike `$mnt_base`. This caused the system-ca-certs module to only work for the first boot after it was enabled, since `mkdir` would fail on subsequent boots.
@chenxiaolong chenxiaolong force-pushed the system-ca-certs-mkdir branch from a9e7385 to 07c7091 Compare February 3, 2026 23:51
chenxiaolong added a commit that referenced this pull request Feb 3, 2026
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@chenxiaolong chenxiaolong merged commit 07c7091 into chenxiaolong:master Feb 3, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants