#!/bin/sh

VOLUME_DEFAULT_VALUE=50

# Check args
if [ ${#} -ne 0 ]; then
    echo "Usage: $(basename ${0})"
    exit 1
fi

# Sanity check: Check if integer
volume=$(fw_printenv -n volume 2>/dev/null)
if ! [ ! "${volume}" -ne "${volume}" ] 2> /dev/null; then
    volume=${VOLUME_DEFAULT_VALUE}
	fw_setenv volume ${volume}
fi
echo ${volume}
exit 0
