]> git.nbdom.net Git - nb.git/commitdiff
fix bug nb-install
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 1 Feb 2017 13:54:36 +0000 (14:54 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 1 Feb 2017 13:54:36 +0000 (14:54 +0100)
etc/profile.d/functions

index ce1a11097f92401438e93066d2b41598ea143dac..f32edd6651c66f0434a7077b5f4a5173ffadfd9e 100644 (file)
@@ -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