No volumes in Linux?

Bob Warren warren at howsoft.com
Fri Sep 9 15:59:49 EDT 2005


Sorry about the delay in replying to all the kind (and very clever) folks
who have taken an interest in listing the Linux volumes through the RR Shell
command - not just the ones mentioned below! I had to give the kiss of life
to my Hoary Hedgehog, and now he is running around again.

Mark Waddington's solution was the one least likely to blow my beginner's
mind, and it seems to have worked. On executing:-

Put the shell of "mount" into ......

- I get the following list on my Ubuntu Linux machine:

/dev/hda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev on /.dev type unknown (rw,bind)
none on /dev type tmpfs (rw,size=5M,mode=0755)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/hdc on /media/cdrom0 type iso9660 (ro,noexec,nosuid,nodev,user=bob)

My HD and CD-Rom drives (volumes) are correctly reported in the first
and last lines, and I can use these to extract the info I want.

Thanks Mark!

'''''''''''''''''''''''''''''''''''''''
Chris Kassopulo's proposal:

For a list of all drives use:

sudo sfdisk -s
/dev/hda:  58652496
total: 58652496 blocks

For a list of all partitions use:

sudo sfdisk -l

That's great info for a Linux novice. Thanks Chris! But of course it suffers
the problem of root privileges elucidated by Mark when calling through the
RR Shell. The result through the shell is a request to enter my password,
but no info about the volumes.

''''''''''''''''''''''''''''''''
Ken Ray's proposal:

Bob, here's how I do it with OSX's shell; perhaps this will work with Linux
as well (in this case I'm executing a 'kill' on a process with sudo):

    put "#!/bin/sh" & cr into tScript
    put "pw="&tPassword & cr into tScript
    put "echo $pw | sudo -S kill -9" && tProcessID & cr after tScript
    get shell(tScript)

Substituting an actual string for "tPassword" is OK, but to see whether this
might work under Linux I need to know what to put in place of "tProcessID".
Wossis?
Sorry about the ignorance factor on my part........

'''''''''''''''''''''''''''''''
Xavier's (MisterX's) proposal:

would this do it then?

function GetLinuxvolumes includeUSB
  put includeUSB is true into includeUSB
  put url "File:/etc/mtab" into vlist
  if includeUSB then
    put vlist into usblist
    filter usblist with "*usb*"
  end if
  filter vlist with "*hda*"
  if includeUSB then put CR & usblist after vlist
  repeat for each line l in vlist
    get word 2 of l
    if it is not empty then put it & cr after drivelist
  end repeat
  delete last char of drivelist
  return drivelist
end GetLinuxvolumes

That looks promising! Thanks for the work! But it's horrible being an RR
novice as well as a novice in Linux too. I don't know how to call this
function, since its format seems a little different from the example
function call given in the RR Help. It's the "includeUSB" bit that has me
fogged, since the only buses I am used to taking usually end up in
Piccadilly Circus! Would you be kind enough to give me an example of
how to call this function? It may or may not work in Linux, but at least I
will have learned something about calling functions! Thanks.

'''''''''''''''''''''''''''''''''''
Thank you all once again.

Best,
Bob











More information about the use-livecode mailing list