working vendor record plus new system time update
authorChris Koeritz <fred@gruntose.com>
Mon, 18 Mar 2019 22:52:51 +0000 (18:52 -0400)
committerChris Koeritz <fred@gruntose.com>
Mon, 18 Mar 2019 22:52:51 +0000 (18:52 -0400)
the vendor record got purged of its insane missing line problem by uploading it to google and then downloading it again.  freaking weird.
the update_system_time script is a simple wrapper for rdate, which has been throwing obnoxious "problem: successful" kinds of messages for a while.  don't know if the weird success message is accompanied by a result value of zero, as in success, or not, but we'll find out by what this script says.  now in use on serene for time updates.

infobase/document_templates/fallout76_vendor_record-borked.odt [deleted file]
infobase/document_templates/fallout76_vendor_record.odt [new file with mode: 0644]
scripts/system/update_system_time.sh [new file with mode: 0644]

diff --git a/infobase/document_templates/fallout76_vendor_record-borked.odt b/infobase/document_templates/fallout76_vendor_record-borked.odt
deleted file mode 100644 (file)
index 468fa44..0000000
Binary files a/infobase/document_templates/fallout76_vendor_record-borked.odt and /dev/null differ
diff --git a/infobase/document_templates/fallout76_vendor_record.odt b/infobase/document_templates/fallout76_vendor_record.odt
new file mode 100644 (file)
index 0000000..c95e7bc
Binary files /dev/null and b/infobase/document_templates/fallout76_vendor_record.odt differ
diff --git a/scripts/system/update_system_time.sh b/scripts/system/update_system_time.sh
new file mode 100644 (file)
index 0000000..01efc95
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# a simple time update script that traps output from rdate, since we
+# get a lot of noise even when a successful update occurs, to whit:
+#  "rdate: Could not read data: Success"
+#
+# author: chris koeritz
+
+#hmmm: the generalized pattern of show output only on error is embodied below.  make it a function.
+
+outfile="$(mktemp /tmp/update_system_time.XXXXXX)"
+/usr/bin/rdate -s time.nist.gov &> "$outfile"
+retval=$?
+if [ $retval -ne 0 ]; then
+  echo "Actual error code $retval returned by rdate, with output:"
+  cat "$outfile" 
+fi
+rm -f "$outfile"
+