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: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
d8530c4144
commit
1a9eb8973e
|
@ -681,7 +681,7 @@ mount_root_partition() {
|
||||||
run_hooks() {
|
run_hooks() {
|
||||||
scriptsdir="$1"
|
scriptsdir="$1"
|
||||||
|
|
||||||
if [ -z "$(ls -A "$scriptsdir")" ]; then
|
if [ -z "$(ls -A "$scriptsdir" 2>/dev/null)" ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user