git: c8b81d5ff2f4 - stable/14 - etcupdate: Make diff -l actually work
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 08 Jun 2026 23:01:11 UTC
The branch stable/14 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=c8b81d5ff2f404570c35653a1256916b06865f28
commit c8b81d5ff2f404570c35653a1256916b06865f28
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-06-04 22:41:27 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-06-08 23:00:54 +0000
etcupdate: Make diff -l actually work
While here, remove unnecessary blank lines.
MFC after: 1 week
Fixes: 6d65c91b9a47 ("etcupdate: fix arguments order of diff command")
Reviewed by: Boris Lytochkin <lytboris@gmail.com>
Differential Revision: https://reviews.freebsd.org/D57330
(cherry picked from commit a85e39030f8c7faa3d5a33373389440de6f0fff7)
---
usr.sbin/etcupdate/etcupdate.sh | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh
index f62343a24eee..738e4f4ef378 100755
--- a/usr.sbin/etcupdate/etcupdate.sh
+++ b/usr.sbin/etcupdate/etcupdate.sh
@@ -504,42 +504,32 @@ diffnode()
$COMPARE_EQUAL)
;;
$COMPARE_ONLYFIRST)
- echo
echo "Removed: $3"
- echo
;;
$COMPARE_ONLYSECOND)
- echo
echo "Added: $3"
- echo
;;
$COMPARE_DIFFTYPE)
first=`file_type $1/$3`
second=`file_type $2/$3`
- echo
echo "Node changed from a $first to a $second: $3"
- echo
;;
$COMPARE_DIFFLINKS)
first=`readlink $1/$file`
second=`readlink $2/$file`
- echo
echo "Link changed: $file"
rule "="
echo "-$first"
echo "+$second"
- echo
;;
$COMPARE_DIFFFILES)
if [ -n "$difflistonly" ]; then
- echo
echo "Changed: $3"
- echo
- break;
+ else
+ echo "Index: $3"
+ rule "="
+ diff -u $diffargs -L "$3 ($4)" -L "$3 ($5)" $1/$3 $2/$3
fi
- echo "Index: $3"
- rule "="
- diff -u $diffargs -L "$3 ($4)" -L "$3 ($5)" $1/$3 $2/$3
;;
esac
}