#!/bin/bash
# Author: Steven Shiau <steven _at_ nchc org tw>
# License: GPL
# Description: Program to start saving or restoring image in Clonezilla live.

# Load DRBL setting and functions
if [ ! -f "/opt/drbl/sbin/drbl-conf-functions" ]; then
  echo "Unable to find /opt/drbl/sbin/drbl-conf-functions! Program terminated!" 
  exit 1
fi
. /opt/drbl/sbin/drbl-conf-functions
. /opt/drbl/sbin/ocs-functions
. /opt/drbl/conf/drbl-ocs.conf
# load the setting for clonezilla live.
. /etc/ocs/ocs-live.conf

# Get the live media mount point.
get_live_media_mnt_point

# prepare the clonezilla live environment.
ocs-live-env-prepare

# Do not ask powerer/reboot/choose (-p) in ocs-sr,  just use "-p true". Since it might be in bterm, and Debian live "Press Enter" message when poweroff/shutdown might be coverd by bterm and user will not have any idea what's happening after choose poweroff/reboot.
# ocs_lang and ocs_live_extra_param are loaded from /etc/ocs/ocs-live.conf
ocs-sr -l $ocs_lang -p true $ocs_live_extra_param

# Show prompt
show-general-ocs-live-prompt
