umount_all notify kdialog


#!/bin/bash

ls /media |grep -v cdrom0 |grep -v cdrom> /tmp/disk_status
df -h | grep Filesystem > /tmp/disk_status
df -h | grep media >>/tmp/disk_status
notify-send "Status:" "`cat /tmp/disk_status`" -t 3000
for i in `ls /media`
do
cd /media
umount $i
done

ls /media |grep -v cdrom0 |grep -v cdrom> /tmp/disk_status
#kdialog --passivepopup "<h1>Mounted devices: `cat /tmp/disk_status`" 4
file=/tmp/disk_status
if [ ! -s $file ]; then
notify-send "No Mounted Devices" "Nothing" -t 1000
else
notify-send "Mounted Devices" "`cat /tmp/disk_status`" -t 1000
fi