[Git][NTPsec/ntpsec][master] 2 commits: ntpleapfetch: It is only an error if the program does not continue.

Gary E. Miller gitlab at mg.gitlab.com
Wed Sep 27 02:36:31 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
98ae568d by Gary E. Miller at 2017-09-26T18:59:23-07:00
ntpleapfetch: It is only an error if the program does not continue.

So no leapfile in ntp.conf is a warning.

OTOH, ntpleapfetch continues, then blows up later...

- - - - -
3ace9b19 by Gary E. Miller at 2017-09-26T19:34:04-07:00
ntpleapfetch: fix chmod/chown on CentOS

Older chmod/chown need an equal sign after --reference.  Newer
chmod/chown do not care.

- - - - -


1 changed file:

- ntpclients/ntpleapfetch


Changes:

=====================================
ntpclients/ntpleapfetch
=====================================
--- a/ntpclients/ntpleapfetch
+++ b/ntpclients/ntpleapfetch
@@ -324,7 +324,7 @@ fi
 # FIXME broken on MacOS/macports
 LEAPFILE="`sed $NTPCONF -e'/^ *leapfile  *.*$/!d' -e's/^ *leapfile  *//'`"
 if [ -z "$LEAPFILE" ]; then
-    log "error" "$NTPCONF does not specify a leapfile"
+    log "warning" "$NTPCONF does not specify a leapfile"
 fi
 
 # Allow placing the file someplace else - testing
@@ -371,11 +371,12 @@ if [ -n "$FORCE" ] || ! verifySHA1 $LEAPFILE "$VERBOSE" || [ $EXPIRES -lt `date 
             if [ ! -f $LEAPFILE ]; then
 		log "notice" "$LEAPFILE was missing, creating new copy - check permissions"
                 touch $LEAPFILE
-		# Can't copy permissions from old file, copy from NTPCONF instead
+		# Can't copy permissions from old file,
+                # copy from NTPCONF instead
 		REFFILE="$NTPCONF"
             fi
-            chmod --reference $REFFILE $TMPFILE
-            chown --reference $REFFILE $TMPFILE
+            chmod --reference=$REFFILE $TMPFILE
+            chown --reference=$REFFILE $TMPFILE
 	    ( which selinuxenabled && selinuxenabled && which chcon ) >/dev/null 2>&1
             if  [ $? == 0 ] ; then
                 chcon --reference $REFFILE $TMPFILE



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/1a218f3b34d1eaf45404b819ef2a2a73bac123a7...3ace9b1970446d358b30e54a1315e79dbfccad2f

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/1a218f3b34d1eaf45404b819ef2a2a73bac123a7...3ace9b1970446d358b30e54a1315e79dbfccad2f
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170927/ed04e9aa/attachment.html>


More information about the vc mailing list