Author SHA1 Message Date
Chris A. Bunt c0b5cdfaf6 removed legacy code
removed deprecated timesamp code
2017-06-04 21:39:41 -05:00
Chris A. Bunt 2cc6d55918 Updated methodology of timestamp entry
Updated the methodology used to generate timestamp (using $(command)
rather than `command`)
2017-06-04 21:37:34 -05:00
Chris A. Bunt b323542dd1 non-audo-cd bug fix and add timestamp to logs
Added a timestamp to each logfile (line 20) and corrected a condition
where I was getting a syntax error reported to root@localhost (email)
when a non-audio CD is inserted.
2017-06-04 20:10:14 -05:00
2 changed files with 5 additions and 9 deletions
+3 -8
View File
@@ -162,15 +162,10 @@ PO_APP_KEY=""
# use the label of the DVD/CD or else use empty.log
# this is required for udev events where there is no media available
# such as ejecting the drive
if [ -n "$ID_FS_LABEL" ]; then
LOGFILE=${ID_FS_LABEL}".log"
elif [[ -n "$ID_CDROM_MEDIA_TRACK_COUNT_AUDIO" && $(which abcde-musicbrainz-tool) ]]; then
LOGFILE=$(abcde-musicbrainz-tool --device "$DEVNAME" | cut -f1 -d ' ')".log"
elif [[ -n "$ID_CDROM_MEDIA_TRACK_COUNT_AUDIO" && $(which cd-discid) ]]; then
LOGFILE=$(cd-discid "$DEVNAME" | cut -f1 -d ' ')".log"
else
if [ -z "$ID_FS_LABEL" ]; then
LOGFILE="empty.log"
else
LOGFILE=${ID_FS_LABEL}".log"
fi
# Set full logfile path
+2 -1
View File
@@ -17,6 +17,7 @@ mkdir -p "$LOGPATH"
# excludes sensative parameters
# shellcheck disable=SC2129
echo "*** Start config parameters ****" >> "$LOG"
echo -e "\tTimestamp: $(date -R)" >> "$LOG"
# shellcheck disable=SC2002
cat "$ARM_CONFIG"|sed '/^[#;].*$/d;/^$/d;/if/d;/^ /d;/^else/d;/^fi/d;/KEY=/d;/PASSWORD/d' >> "$LOG"
echo "*** End config parameters ****" >> "$LOG"
@@ -106,7 +107,7 @@ if [ "$ID_FS_TYPE" == "udf" ]; then
fi
elif (("$ID_CDROM_MEDIA_TRACK_COUNT_AUDIO" > 0 )); then
elif [ -n "$ID_CDROM_MEDIA_TRACK_COUNT_AUDIO" ]; then
echo "identified audio" >> "$LOG"
abcde -d "$DEVNAME"