From: Nicolas Boisselier Date: Wed, 1 Feb 2017 13:54:36 +0000 (+0100) Subject: fix bug nb-install X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=59a9d234f11617b49b5f53b010b0dd3d6acf6d19;p=nb.git fix bug nb-install --- diff --git a/etc/profile.d/functions b/etc/profile.d/functions index ce1a1109..f32edd66 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -461,12 +461,12 @@ cron_d_install() { if [ "$test" = "1" ]; then printf '%s' "$FUNCNAME: /etc/cron.d: $fname" - [ "$(cat $file 2>/dev/null)" != "$(cat /etc/cron.d/$fname)" ] && echo ': Changed' && return + [ "$(cat $file 2>/dev/null)" != "$(cat /etc/cron.d/$fname 2>/dev/null)" ] && echo ': Changed' && return echo ': Not changed' return 1 fi - [ "$(cat $file 2>/dev/null)" != "$(cat /etc/cron.d/$fname)" ] && cp "$file" "/etc/cron.d/$fname" + [ "$(cat $file 2>/dev/null)" != "$(cat /etc/cron.d/$fname 2>/dev/null)" ] && cp "$file" "/etc/cron.d/$fname" return fi