#!/bin/bash

# Script to unmount module mounted at /mnt/loop
# This script is called by konqueror service menu
# Author: Brokenman <brokenman@porteus.org>

path=${1}
mod=${2}

if [ -d /mnt/loop ]; then
	chk=`ls /mnt/loop`
		if [ "$chk" == "" ]; then
			kdialog --msgbox "$mod is not mounted at /mnt/loop"
			exit
				else
			umount /mnt/loop
			kdialog --passivepopup "/mnt/loop was unmounted" 3
			exit
		fi
		else
	kdialog --msgbox "$mod is not mounted at /mnt/loop"
fi
exit
