aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-05-10 16:47:54 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-07-11 12:52:01 +0200
commit9362ea166168c79cbe8f589073350508e7216876 (patch)
tree46289c0a87a4eaadf0df8b1bdbd4ce9ce8cc1408 /package/base-files
parentb837216345d4f36beea9550821ee653b060864b1 (diff)
downloadupstream-9362ea166168c79cbe8f589073350508e7216876.tar.gz
upstream-9362ea166168c79cbe8f589073350508e7216876.tar.bz2
upstream-9362ea166168c79cbe8f589073350508e7216876.zip
base-files: remove useless cat
Check file contents directly instead of using cat. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'package/base-files')
-rwxr-xr-xpackage/base-files/files/sbin/pkg_check2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/base-files/files/sbin/pkg_check b/package/base-files/files/sbin/pkg_check
index 775e401b26..28e87925ae 100755
--- a/package/base-files/files/sbin/pkg_check
+++ b/package/base-files/files/sbin/pkg_check
@@ -91,7 +91,7 @@ while [ "$1" ]; do
# Do we have changed files or not?
if [ -z "$ERR" ]; then
- [ $QUIET = yes ] || [ -z "$(cat "/usr/lib/opkg/info/$1.files-sha256sum")" ] || echo "$CHECK" | sed 's|^| - |'
+ [ $QUIET = yes ] || [ ! -s "/usr/lib/opkg/info/$1.files-sha256sum" ] || echo "$CHECK" | sed 's|^| - |'
[ $QUIET = yes ] || echo " * Package $1 is ok"
[ $QUIET = yes ] || echo
else