]> git.nbdom.net Git - nb.git/commitdiff
cron_d_install
authorNicolas Boisselier <nicolas.boisselier@semantico.com>
Tue, 6 Sep 2016 14:14:04 +0000 (15:14 +0100)
committerNicolas Boisselier <nicolas.boisselier@semantico.com>
Tue, 6 Sep 2016 14:14:04 +0000 (15:14 +0100)
etc/profile.d/functions

index a09f45bb8c7994b1a16d956682c2c1d2f79042b7..aaf5ac8254d1d5253dd10a1606f19f281381f3b1 100644 (file)
@@ -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