Is it possible?
I'm trying to use this script to mount my NAS device (USB stick on router)
FAILAT 21
LAB Check
ping -c=3 >NIL: Fritz.Box ; Lets see if our Router is online
IF WARN
wait 5 ; Wait 5 seconds until next retry as NAS seems to be offline
ELSE ; Mount with SMBFS
C:Run >NIL: Samba:smbfs/smbfs WORKGROUP="Fritz!Box" QUIET DEVICE=SMBFS: VOLUME=Fritz.NAS: CACHE=50 TRANSLATE="L:FileSystem_Trans/INTL.crossdos" SERVICE=//Fritz.Box/Fritz.NAS/
SKIP Lock ; Locking the partition to read-only
ENDIF
SKIP BACK Check ; If NAS is not online, repeat
LAB Lock
IF EXISTS Fritz.NAS:FRITZ/ ; NAS may be online (successfull ping) but not yet accessable from the OS
C:Lock Fritz.NAS: ON >NIL: ; Set Read-Only for Amiga OS
SKIP EXIT
ELSE
wait 5 ; Wait 5 seconds
SKIP BACK Lock ; and repeat
ENDIF
LAB EXIT
I'm using the script in WBStartup
Working great so far.
Except the second IF (EXISTS) prompts me a requester everytime the NAS is not accessable
(unless i set a wait state before which is long enough so that NAS is already useable, i could measure that, but its not what i wrote an IF loop for)
Please insert blah, blah, blah
Can i suppress it or make it choose "Retry" by default?
(No third-party programs please, i want to achieve that in AmigaDOS)
Thank you for any hints and also for bashing my scripting talents
...and thinking about it, here comes a feature request for the Workbench prefs
Please can i have a switch to make HDs, Partitions read-only on Workbench start? (Like with the option to hide them)
Thank you