[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



-------------------------
#!/bin/sh

for D in b c d e f g; do
   if mount -t iso9660 /dev/hd$D /cd; then
     break;
   fi
done
-------------------------

-Jim P. 

On Wed, 2005-03-30 at 16:34 -0500, Christopher Fowler wrote:
> I am creating a bootable usb stick and I need to somehow cycle through
> the devices until I get a successful mount.  Right now I'm doing it with
> cdrom so I do something like this
> 
> mount -t iso9660 /dev/hdb /cd || mount -t iso9660 /dev/hdc /cd
> 
> What would be good loop that could do this for me?
> 
> 
> 
> 
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00555" href="msg00555.html">[ale] Simple shell scripting</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Christopher Fowler)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00555.html">[ale] Simple shell scripting</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00557.html">[ale] Simple shell scripting</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00555.html">[ale] Simple shell scripting</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00557.html">[ale] Simple shell scripting</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00556"><strong>Date</strong></a></li>
<li><a href="threads.html#00556"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>