Home | OS/2 Software | Rexx | A simple server based applet

A simple server based applet

Contributed by: William Pociengel

For a simple server based applet:

See if the disks are clean or dirty if they're dirty spawn off a chkdsk /f:2 and if files are needed for the server's exports then delay starting the server until all required disks are clean.

Here's my snippet but it almost works but not quite (I haven't given up yet;-)


 


in startup.cmd:
-----------------------------------
call c:\bin\d_available.cmd
net start server
-----------------------------------

and d_available.cmd
-----------------------------------
/* an introduction to rexx */
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
Disk_is = SysDriveInfo('d:')
test_disk='The_Test_Disk_is 'Disk_is
if test_disk = 'The_Test_Disk_is'
then
/* say 'chkdsk is executing'*/
/* if i put anything else in here then the else will error out */
/* say test_disk */
'chkdsk  f:'
else
say 'the disk is available'
/* the following will always execute.
there can be only one line under the control
of the if then construct */
say 'I will aways execute'