#!/bin/sh # tloop.sh - Manage Loopback Devices & Image Mounts For Linux # Copyright (c) 2015 TundraWare Inc., Des Plaines, IL 60018 USA # All Rights Reserved. # $Id: tloop.sh,v 1.101 2015/04/23 21:01:10 tundra Exp $ case $1 in on) modprobe loop losetup -f ;; mount) losetup /dev/loop0 $2 partprobe /dev/loop0 ;; off) losetup -d /dev/loop0 ;; *) echo "Useage: tloop on | mount imagename | off" ;; esac