Skip to content

Commit

Permalink
scripts: use short stat options
Browse files Browse the repository at this point in the history
Busybox's stat doesn't understand the long options:

  stat: unrecognized option: dereference

But it does support '-L'.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
  • Loading branch information
matttbe committed Jan 27, 2025
1 parent a88b9a1 commit 9d8da3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/check-permissions
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ exit_status=0

for p in $@; do
# Access rights in human readable form (e.g. "drwxrwxr-x")
perms=`stat --dereference --format=%A $p`
perms=`stat -L -c %A $p`

# The write mode for "others".
other_write=`echo $perms | sed -e 's/.*\(.\).$/\1/'`
Expand Down

0 comments on commit 9d8da3e

Please sign in to comment.