#!/bin/bash
#This script is called to perform any setup specific to release preparation
#mode. This is enabled by running QEMU with an apt repository as a 9P shared
#filesystem with the tag hostfs_apt.
#
#When release prepraration mode is enabled, a default launcher configuration is
#created before the launcher runs in order to keep it from treating it as a
#first boot and asking about update mode and popping up the README, the APT
#repository is forced to file:///media/hostfs_apt, and the launcher config file
#is removed on shutdown so that the next non-release-prep boot will be treated
#as a first boot

. "`dirname $0`/bootscriptfunctions.sh"

if ! release_prep_enabled
then
	exit
fi

cd "$OSM_ROOT"
rm -f conf/launcher.conf
#call get_conf_value since it will initialize the config
get_conf_value update meta_package > /dev/null
chown osmuseum:osmuseum conf/launcher.conf
