bootless_rsync ${BOOTLESS_DIR} ${tmpdir}/boot
# Make rescue disk
+ echo "Generating the rescue image..."
grub-mkrescue -o ${output} ${tmpdir}
+ # Check rescue disk
+ echo "Generated image details:"
+ xorriso -indev ${output} -toc
+
# Optionally copy to removable media
if [ ! -z "$device" ]; then
# Issue a warning
exit 1
}
+# Check dependencies
+function bootless_check_dependencies {
+ for dependency in $DEPENDENCIES; do
+ if ! which $dependency 2> /dev/null; then
+ echo "$NAME: unmet dependency $dependency, please install it"
+ exit 1
+ fi
+ done
+}
+
# Load
bootless_load $*
BOOTLESS_VERSION="0.0.1"
BOOTLESS_ACTION="$1"
BOOTLESS_DIR="$2"
+DEPENDENCIES="xorriso grub-mkrescue rsync dd"
# Output name and version
echo "$NAME $BOOTLESS_VERSION"
+# Check dependencies
+bootless_check_dependencies
+
# Parameter verification
if [ -z "$BOOTLESS_DIR" ]; then
bootless_usage