fstab

Bob Warren bobwarren at howsoft.com
Mon Jul 10 14:48:22 EDT 2006


Mark Wieder wrote:
 >
Whew! My sanity is licking its wounds.
------------------
Sorry. My wounds need emergency surgery!

Thanks for the great experiment, Mark. There must indeed be something 
happening in my stack that I have not latched on to yet.

This stack was originally created and tested on my installed Ubuntu 
Hoary Hedgehog. Now, I have a completely updated Ubuntu Breezy Badger 
installed, and I have just gone back to make sure my stack/standalone 
works as before. I have re-loaded my Ubuntu and have not attempted to 
access (perhaps mount) the floppy in any way. For the stack/standalone, 
what I now get is an icon for the HD and one for the CD-Rom, but none 
for the floppy! Examining the fstab, there is now no mention of the floppy!

--------------------------
Here is the fstab:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/hda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/hda5       none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0

-------------------------
And here is the routine trying to access it:

on Check_CD_and_Diskette_Exist

   Global NumberOfDrives

   open file "/etc/fstab" for binary read
   read from file "/etc/fstab" until EOF
   close file "/etc/fstab"
   put it into field "fstab" of card "Card2"

   set the visible of image "Diskette" to false
   set the visible of image "CD" to false

   repeat for each line thisLine in field "fstab" of card "Card2"
     if word 2 of thisLine = "/media/floppy0" then
       set the visible of image "Diskette" to true
       put NumberOfDrives + 1 into NumberOfDrives
       put field "DriveField" & return & "/media/floppy0" into field 
"DriveField"
     end if

     if word 2 of thisLine = "/media/cdrom0" then
       set the visible of image "CD" to true
       put NumberOfDrives + 1 into NumberOfDrives
       put field "DriveField" & return & "/media/cdrom0" into field 
"DriveField"
     end if

   end repeat

end Check_CD_and_Diskette_Exist

------------------------------
So now I try accessing the diskette by clicking on the menu for it, and 
I try opening the fstab in the text program again to examine whether or 
not the line for the floppy has been included. The display is as before 
(i.e. without any line at all for the floppy, but the text program tells 
me that the fstab is already open (even though I closed the text program 
before and there is no sign of an icon for it in the task bar at the 
bottom of the screen or when I use ALT+TAB to see what programs are 
supposedly open. It must therefore be that since my Rev project is still 
open, Ubuntu thinks that the fstab is still open as well, even though 
the routine above supposedly closes it.

So I try re-loading my Ubuntu, accessing the floppy drive immediately, 
loading my Rev project again, and then examining the fstab. But I don't 
get that far, because Ubuntu can no longer read my floppy at the 2nd 
step, even though the same diskette has been successfully read by Ubuntu 
on a hundred occasions previously!

I'll get back to you.....

Bob







More information about the use-livecode mailing list