I was reading on the forums that Mabox Control Center displays the date of original installation so I decided to check my daily driver. Keep in mind that I have gone out of my way to break this system to no avail. However I do find the occasional ‘glitch.’
I copied the mcc script from the USB installation into /bin and ran it again, thinking I had somehow altered the one on my main computer installation. Again same Result.
Install date in mcc is based on /var/log/pacman.log.
Here is how the calculation goes:
if [[ -e /var/log/pacman.log ]]; then
INST="$(sed 1q /var/log/pacman.log)"
INST="${INST/ */}"
INST="${INST/T*/}" # newer pacman adds a different timestamp (TXX:XX:XX+0000), we just want the date
INST="${INST/\[/}"
#INST="${INST//\-/ }"
fi
# Days ago
TODAY=$(date +%F)
let DIFF=($(date +%s -d ${TODAY})-$(date +%s -d ${INST}))/86400
if [[ "$DIFF" > "1" ]];then
DAGO="(${DIFF} ${DAYS_AGO})"
else
DAGO=""
fi
Doing some further testing, I copied the mcc script into my work folder, commented out the block of text that is used to determine the install date of Mabox and inserted 1 line. It works, I guess, I have yet to fully test if I broke anything else. Will let you know.