mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-07 07:24:22 +02:00
problem with test/test-preserve.sh was that it compared the group column from out put of ls. If the group name was longer than 8 the test would fail because busybox' ls truncate the groupname. We solve this by using stat -c %G instead, which does not truncate the group name.
13 lines
433 B
Diff
13 lines
433 B
Diff
diff --git a/tests/test-preserve.sh b/tests/test-preserve.sh
|
|
index 40b8689..f3e9b87 100755
|
|
--- a/tests/test-preserve.sh
|
|
+++ b/tests/test-preserve.sh
|
|
@@ -40,7 +40,7 @@ if [ $? != 0 ] ; then
|
|
exit 1
|
|
fi
|
|
|
|
-act_group=$(ls -l $hosts | sed -e 's/ */ /g' | cut -d ' ' -f 4)
|
|
+act_group=$(stat -c "%G" $hosts)
|
|
act_mode=$(ls -l $hosts | cut -b 1-10)
|
|
if [ $selinux = yes ] ; then
|
|
act_con=$(stat --format=%C $hosts | cut -d ':' -f 3)
|