#!/bin/bash type getarg > /dev/null 2>&1 || source /lib/dracut-lib.sh [ ! -d /sysroot/container ] && mkdir -p /sysroot/container CONTAINER="$(getarg void-usb-container)" case "$CONTAINER" in LABEL=* | UUID=* | PARTUUID=* | PARTLABEL=*) CONTAINER="$(label_uuid_to_dev "$CONTAINER")" ;; /dev/*) true ;; *) echo -e "Invalid value for 'void-usb-container' kernel command line parameter!\nDropping into emergency shell." emergency_shell esac mount -t f2fs -o nodev,nosuid "$CONTAINER" /sysroot/container if [ -f /sysroot/container/squashfs.img ]; then losetup -r -f /sysroot/container/squashfs.img else echo "Failed to find squashfs image. Dropping into an emergency shell. Good luck!" emergency_shell fi