#!/bin/bash
# Author: Steven Shiau <steven _at_ nchc org tw>
# License: GPL
# Description: Program to start restoring image in Clonezilla live.
# //NOTE// We can not just run "LC_ALL=$ocs_lang ocs-sr $ocs_live_extra_param" if the embedded image is on the recovery iso, since without ocs-live-env-prepare, it won't show in $ocsroot. That's why we have this program.

# Load DRBL setting and functions
DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/opt/drbl/}"

. $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions
. $DRBL_SCRIPT_PATH/conf/drbl-ocs.conf
. $DRBL_SCRIPT_PATH/sbin/ocs-functions

# load the setting for clonezilla live.
[ -e /etc/ocs/ocs-live.conf ] && . /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

# ocs_lang and ocs_live_extra_param are loaded from /etc/ocs/ocs-live.conf
LC_ALL=$ocs_lang ocs-sr $ocs_live_extra_param
