/usr/sbin/ocs-live-final-action is in clonezilla 3.5.2-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | #!/bin/bash
# Author: Steven Shiau <steven _at_ nchc org tw>
# License: GPL
# //NOTE// Do not put poweroff/reboot in this program since it's run in jfbterm/bterm. We separate the final action from ocs-live-final-action. Otherwise if the poweroff command run in jfbterm/bterm, the Debian live "Press Enter" message after poweroff/shutdown command is issued might be coverd by jfbterm/bterm and user will not have any idea what's happening after choose poweroff/reboot.
# We need to know ocsroot.
DRBL_SCRIPT_PATH="${DRBL_SCRIPT_PATH:-/usr/share/drbl}"
. $DRBL_SCRIPT_PATH/sbin/drbl-conf-functions
. /etc/drbl/drbl-ocs.conf
. $DRBL_SCRIPT_PATH/sbin/ocs-functions
# Load the options from config file
[ -e /etc/ocs/ocs-live.conf ] && . /etc/ocs/ocs-live.conf
#
output_f="$1"
#
ask_and_load_lang_set $ocs_lang
#
if [ -z "$output_f" ]; then
[ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
echo "Output file was not assigned in $0!"
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
echo "$msg_program_stop!"
exit 1
fi
# check DIA
check_DIA_set_ESC $DIA
##############
#### main ####
TMP="$(mktemp /tmp/ocs_final_act.XXXXXX)"
if mountpoint $ocsroot &>/dev/null; then
rerun2_ocs_with_repo_mounted_1="rerun2"
rerun2_ocs_with_repo_mounted_2="$(rep_whspc_w_udrsc "$msg_run_clonezilla_live_again_but_keep_mounted_repository")"
fi
final_action_flag=1
while [ "$final_action_flag" -ne 0 ]; do
$DIA --default-item "cmd" --nocancel --backtitle "Free Software Labs, NCHC, Taiwan" --title \
"Choose mode" --menu "$msg_clone_finished_choose_to:" \
0 0 0 \
poweroff "$msg_poweroff" \
reboot "$msg_reboot" \
cmd "$msg_enter_cml" \
rerun1 "$msg_run_clonezilla_live_again" \
$rerun2_ocs_with_repo_mounted_1 $rerun2_ocs_with_repo_mounted_2 \
2> $TMP
final_action="$(cat $TMP)"
if [ -z "$lang" ]; then
final_action_flag=1
else
final_action_flag=0
fi
done
[ -f "$TMP" ] && rm -f $TMP
echo "$final_action" > $output_f
|