From: Roy Marples Date: Fri, 15 Aug 2008 11:33:33 +0000 (+0000) Subject: If cmp and diff aren't around, try a text match using cat. After all, we are working... X-Git-Tag: v4.0.2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e79a3e4a12ba865f95f21abe8110adb47446293;p=thirdparty%2Fdhcpcd.git If cmp and diff aren't around, try a text match using cat. After all, we are working with text files. --- diff --git a/dhcpcd-run-hooks.in b/dhcpcd-run-hooks.in index 66192942..1e5d5b37 100644 --- a/dhcpcd-run-hooks.in +++ b/dhcpcd-run-hooks.in @@ -87,7 +87,8 @@ change_file() elif type diff >/dev/null 2>&1; then diff -q "$1" "$2" >/dev/null else - false + # Hopefully we're only working on small text files ... + [ "$(cat "$1")" = "$(cat "$2")" ] fi if [ $? -eq 0 ]; then rm -f "$2"