This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
BigSHinyToys's profile picture

New behaviour for network disk drives

Started by BigSHinyToys, 20 March 2013 - 01:55 AM
BigSHinyToys #1
Posted 20 March 2013 - 02:55 AM
Disk drives currently auto connect to every computer on the wired network automatically. I propose that disk drives become more controllable using new functions setMountPath() and unMount() .A disk drive would no longer auto mount. For a computer to access it you would need to locate it on the network and remote peripheral call it with setMountPath . A disk drive could be mounted by Only by one computer OR multiple computers with different or the same path's .The choice would be up to you devs.

The reasoning behind this would be to give better control over devices in a network environment and allow multiple disk drives to be moued with meaning full names.

Anyway what you think?
PixelToast #2
Posted 20 March 2013 - 03:05 AM
i like this
Sammich Lord #3
Posted 20 March 2013 - 03:09 AM
This would be pretty nice. How about have to default shell automaticly detect them though so the 'Ask A Pro' section doesn't get spammed?
Cloudy #4
Posted 20 March 2013 - 03:10 AM
Disk drives not auto-mounting would break existing programs.
PixelToast #5
Posted 20 March 2013 - 03:22 AM
Disk drives not auto-mounting would break existing programs.
not through cables though
and setting a mount path would be nice also, can be done without breaking existing programs
Cloudy #6
Posted 20 March 2013 - 03:58 AM
To the peripheral there is no distinction between being attached to a computer or a cable. I'm sorry but I disagree that they shouldn't automount.
BigSHinyToys #7
Posted 20 March 2013 - 04:10 AM
To the peripheral there is no distinction between being attached to a computer or a cable. I'm sorry but I disagree that they shouldn't automount.
well if there are say 10 computers on a network then ten computers would have to unmount a drive or one computer mounts it. having them auto mount would kinda defeat the point of mounting / unmounting.

On another point the auto mounting allows a hacker to take over all computers by placing a disk with startup in the main first disk drive.
maybe the shell should handle the mounting process and have a program for mounting drives that is simple like.

>mount drive_0 disk2
mounted as disk2
Cloudy #8
Posted 20 March 2013 - 04:32 AM
I'll point this out to dan when I see him next, but I really disagree that the behaviour should be different for remote peripherals.
Sebra #9
Posted 22 March 2013 - 03:28 AM
May be let them all mounted but "startup" launched from directly attached drives?
wilcomega #10
Posted 26 March 2013 - 03:01 AM
great idea. that you have to mount a disk before you can use it. and also that you can mount it to any directory you want, best idea.
the bios.lua would have to change to mount every disk and such.