#!/bin/bash
# License: GPL 
# Author: Steven Shiau <steven _at_ clonezilla org>
# Description: Program to show the kernel messages about removable disks
# //NOTE// This program is used to work with screen.

#
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 config in ocs-live.conf. This is specially for Clonezilla live. It will overwrite some settings of /etc/drbl/drbl-ocs.conf, such as $DIA...
[ -e "/etc/ocs/ocs-live.conf" ] && . /etc/ocs/ocs-live.conf

# Settings

#
ask_and_load_lang_set

#
now="$(LC_ALL=C date +%Y/%m/%d" "%T)"
echo "$now"
[ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
echo -e "$msg_insert_storage_dev_now"
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
echo "Scanning devices... Available disk(s) on this machine:"
# Show it like:
# NAME    TYPE  SIZE MODEL                          FSTYPE SERIAL
# nvme0n1 disk   64G VMware Virtual NVMe Disk              VMware NVME_0000
# nvme0n2 disk 1000G VMware Virtual NVMe Disk              VMware NVME_0000
# sda     disk   60G VMware Virtual SATA Hard Drive ext4   00000000000000000001
echo "==================================="
LC_ALL=C lsblk -d -o name,type,size,model,fstype,serial -e 1,7,11 -x name
echo "==================================="
echo -en '\033[1;33m'
echo Updates periodically. Press Ctrl-C to exit this window.
echo -en '\033[0;39m'
