# Barix configuration interface
# (c) 2013 Barix AG
#
# meta-file for automatic config-file generation

# destination file for the configuration (absolute path)
DST_FILE=/etc/ferdinand.conf

# template file located in /barix/config/templates/templates (no template)
TEMPLATE_FILE=

# comments are prefixed with this character
COMMENT_PREFIX="#"

# function to create the dynamic content
DYNAMIC_CONTENT_FN=create_dynamic_config

# function to create dynamic content
function create_dynamic_config()
{
	# print mountpoint
	# at the moment support only the first partition on that media
	media=`cfg_print_param application.ferdinand.storage_media`
	if [ "$media" = "usb" ] ; then 
		mountpoint="/media/usbmstg0p1"; 
	else 
		mountpoint="/media/mmcsd0p1"
	fi
	echo "storage_media=$mountpoint"

	# dump other parameters
	for param in \
			data_dir volume_unit debug_level log_output \
			command_port status_file_path config_server \
			config_dir config_port config_protocol \
			config_username config_password \
			rtp_buffer_delay rtp_buffer_accuracy \
			tcp_buffer_delay tcp_buffer_accuracy \
			user_agent
	 do
		value=`cfg_print_param application.ferdinand.$param`
		echo "$param=$value"
	done

}

