From: Nicolas Boisselier Date: Tue, 6 Sep 2016 14:14:04 +0000 (+0100) Subject: cron_d_install X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=b083d3853c275488eae9f48c02c62d895b71d6ed;p=nb.git cron_d_install --- diff --git a/etc/profile.d/functions b/etc/profile.d/functions index a09f45bb..aaf5ac82 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -377,12 +377,12 @@ cron_d_install() { if [ "$test" = "1" ]; then printf '%s' "$FUNCNAME: /etc/cron.d: $fname" - [ "$(cat $file)" != "$(cat /etc/cron.d/$fname)" ] && echo ': Changed' && return + [ "$(cat $file 2>/dev/null)" != "$(cat /etc/cron.d/$fname)" ] && echo ': Changed' && return echo ': Not changed' return 1 fi - [ "$(cat $file)" != "$(cat /etc/cron.d/$fname)" ] && cp "$file" "/etc/cron.d/$fname" + [ "$(cat $file 2>/dev/null)" != "$(cat /etc/cron.d/$fname)" ] && cp "$file" "/etc/cron.d/$fname" return fi