Skip to content
Snippets Groups Projects
Verified Commit edeffb12 authored by Casey's avatar Casey :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 2d0b3424
No related branches found
No related tags found
No related merge requests found
......@@ -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.
Please register or to comment