LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-17-2010, 05:12 PM   #1
Cassanova
Member
 
Registered: Feb 2009
Location: An Evil city in Indiana
Distribution: Fedora Core 10 X86_64, and Ubuntu 6.06
Posts: 61

Rep: Reputation: 15
mounting disc images (automatically)


looking to create a function to mount iso files
thus far it looks as such:
Code:
#Attempting to mount *.iso

function vmount {
su -c 'mount -o loop $1 /media/Virtual_Drive' #This SHOULD mount what I want on a loopback device in the /media/Virtual_Drive folder... theoretically
}
problem is when I run it it says:
Quote:
mount: can't find /media/Virtual_Drive in /etc/fstab or /etc/mtab
when I do it manually (su -c 'mount -o loop my.iso /media/Virtual_Drive) it works just fine. any ideas as to why it doesn't work via fuction, but runs just fine when it's done manually?
 
Old 03-17-2010, 05:27 PM   #2
irmin
Member
 
Registered: Jan 2010
Location: the universe
Distribution: Slackware (modified), Slackware64 (modified), openSuSE (modified)
Posts: 342

Rep: Reputation: 62
The quotes ' will prevent the expansion of $1. Use double quotes " instead of '.
 
Old 03-18-2010, 03:19 PM   #3
Cassanova
Member
 
Registered: Feb 2009
Location: An Evil city in Indiana
Distribution: Fedora Core 10 X86_64, and Ubuntu 6.06
Posts: 61

Original Poster
Rep: Reputation: 15
AHA!!! Thank You! I figured it'd be something simple
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: ISO Master wrangles disc images LXer Syndicated Linux News 0 01-15-2008 05:00 PM
Mounting Disc Images tsunamikitsune Ubuntu 2 06-30-2006 04:14 AM
suse10 OSS invalid sums and wrong disc images AnimaSola Linux - Software 3 01-14-2006 05:17 AM
Bootmenu with Live CD Images on Disc? linjection Linux - Laptop and Netbook 1 01-06-2005 05:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration