#!/bin/bash
#
#	Checks online to see if the ventoy injection file is up to date
#

	/cbin/UpdateInjectionFile --check
	
	if [ $? -eq 1 ]; then #> Just adds an extra blank line if there was output from above.
		echo ""
	fi

#	source /etc/RescueDriveRC #> Variables and connect info for RescueDrive.
	
#	MountPoint="/mnt/$ISOPartLabel"
	
#	if ! mount | grep "on $MountPoint" > /dev/null; then
#		if ! mount -L "$ISOPartLabel" "$MountPoint" -o x-mount.mkdir,shared; then
#			mount -L "Ventoy" "$MountPoint" -o x-mount.mkdir,shared
#		fi
#	fi
	
#	remote_ts=$(curl -sI $InjectionURL | grep -i '^Last-Modified:' | cut -d' ' -f2-) #> Get remote file's Last-Modified timestamp
#	remote_epoch=$(date -d "$remote_ts" +%s) #> Convert to epoch
#	local_epoch=$(stat -c %Y $MountPoint/ventoy/$InjectionFile) #> Get local file's mtime in epoch
#	if [ "$remote_epoch" -ne "$local_epoch" ]; then #> Compare
#		echo " * There is an updated injection file on-line * "
#		echo ""
#	fi
