Advertising
- Mine
- Saturday, October 27th, 2007 at 3:34:30am UTC
- #!/bin/bash
- # mount
- gksudo -k /bin/echo "got r00t?"
- BASENAME=`basename $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS .iso`
- sudo mkdir "/media/$BASENAME"
- zenity --info --title "ISO Mounter" --text "$BASENAME e $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
- if sudo mount -o loop -t iso9660 $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS "/media/$BASENAME"
- then
- if zenity --question --title "ISO Mounter" --text "$BASENAME Successfully Mounted. Open Volume?"
- then
- nautilus /media/"$BASENAME" --no-desktop
- fi
- exit 0
- else
- sudo rmdir "/media/$BASENAME"
- zenity --error --title "ISO Mounter" --text "Cannot mount $BASENAME!"
- exit 1
- fi
- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- #!/bin/bash
- # unmount
- gksudo -k /bin/echo "got r00t?"
- BASENAME=`basename $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS .iso`
- sudo umount "/media/$BASENAME"
- sudo rmdir "/media/$BASENAME"
- zenity --info --text "Successfully unmounted /media/$BASENAME"
- exit 0
advertising
Update the Post
Either update this post and resubmit it with changes, or make a new post.
You may also comment on this post.
Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.