Files
my-kern/rootfs/umount_rootfsh.sh
Rick Rongen 03f0ec6f88 feat: Vfs and Ext2 support. Code style/attribute improvements
Added VFS and Ext2 support.
Optimized attributes of methods to improve code highlighting.
Printf attribute, malloc attribute, etc.
2021-10-06 21:45:15 +02:00

16 lines
189 B
Bash
Executable File

#!/bin/bash
function log() {
echo "$*"
}
LB_DEV=$(findmnt -n -o SOURCE mnt)
if [ -z "${LB_DEV}" ]; then
log "Not mounted"
exit 1
fi
sudo umount mnt
sudo losetup -d "${LB_DEV%p1}"