Skip to content
Snippets Groups Projects
Verified Commit 1a9eb897 authored by Caleb Connolly's avatar Caleb Connolly :recycle: Committed by Clayton Craft
Browse files

postmarketos-initramfs: run_hooks: hide ls error (MR 5636)


We need to use ls to check if the hooks dir contains any hooks
(otherwise the wildcard doesn't work). But ls prints an error if the dir
is missing or empty. Hide the error to not pollute the log.

Signed-off-by: default avatarCaleb Connolly <caleb@postmarketos.org>
parent d8530c41
No related branches found
No related tags found
1 merge request!5636Remove the minimal initramfs and make initramfs-extra opt-in
......@@ -681,7 +681,7 @@ mount_root_partition() {
run_hooks() {
scriptsdir="$1"
if [ -z "$(ls -A "$scriptsdir")" ]; then
if [ -z "$(ls -A "$scriptsdir" 2>/dev/null)" ]; then
return
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment