Hello all,

Just wrote a simple script in python to mount any iso image to any required
location.

Inspiration:

My friends have been finding it difficult to mount iso's. they asked whether
it could be made more easy. guess this went fine.

Inputs:

1. Location of the iso
2. Destination to which it is to be mounted
3. sudo password

To run this script:

1. Set permissions using the following command
$ chmod a+x mnt.py

2. run the script using
$ ./mnt.py

please try and post comments.

thanks

Regards.

-- 
Sajjad Anwar
http://geohackers.in
http://fsugcalicut.org
[email protected]
+91 9995 19 13 12

--~--~---------~--~----~------------~-------~--~----~
"Freedom is the only law". 
"Freedom Unplugged"
http://www.ilug-tvm.org

You received this message because you are subscribed to the Google
Groups "ilug-tvm" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]

For details visit the website: www.ilug-tvm.org or the google group page: 
http://groups.google.com/group/ilug-tvm?hl=en
-~----------~----~----~----~------~----~------~--~---

#!/usr/bin/python

import os

a=raw_input("\nEnter the path of the iso image: ")
b=raw_input("\nEnter the destination: ")
pwd=raw_input("\nOnly root can mount, specify your sudo password: ")

sudo_command = 'mount -o loop %s %s'%(a,b)
print(sudo_command)
do = os.system('echo %s|sudo -S %s' % (pwd, sudo_command))

Reply via email to