CONFIGSORT 2.1 (C)1996 by Philip A. O'Malley 1.1 INTRODUCTION The backbone of an OS/2 system is the config.sys file. Unfortunately, this file starts out as an organizational mess and continually gets worse as numerous applications modify it. Enter ConfigSort. :) ConfigSort will process config.sys and re-organize it into something substantially more functional. System entries are sorted into sections, and additional entries can be optionally organized into user-defined sections or incorporated into the default structure. The difference is quite astounding, as I'm sure you'll agree. 1.2 A NOTE ON VERSION 2.0 Version 1.x of ConfigSort was a completely self-contained entity, with all the application sections hardcoded into the program. With 2.0, the user now has the option of creating their own application entries or change the ones provided with the distribution via an external configuration file. With this increased power comes increased potential to disrupt the smooth running of your system. I would strongly suggest that this documentation is read thoroughly before attempting to modify the application configuration file or, indeed, using the program at all. I know from the e-mail support queries that I had with 1.x that some people (and a bigger percentage than one would think reasonable) simply didn't bother to read the accompanying documentation either before running the program or afterwards when things didn't work. On your own head be it if *you* don't! 2.1 REQUIREMENTS ConfigSort is a compiled REXX program. As a consequence you must have REXX installed, which comes as standard in the OS/2 Warp distribution. In addition, ConfigSort also uses the RXEXTRAS.DLL library and this must be present within the LIBPATH: "/OS2/DLL" is usually a good place. RXEXTRAS.DLL is included in the ConfigSort distribution. 2.2 LICENCE FOR USE ConfigSort is an original program, copyrighted to the author. It may not be modified in any shape or form. It can be freely distributed providing that no charge is made beyond those to cover duplication costs and that the original distribution archive remains unaltered. ConfigSort is provided "as is" and any damage, actual or perceived, caused by the program is not the liability of the author. Your use of the program signifies your acceptance of these conditions. If you have no problems with the above, then onwards... :) 3.1 INSTALLATION 1. Create a directory, eg. /CFGSORT, and place the main program files in there. These are CFGSORT.EXE, CFGSORT.APP and CFGSORT.CLI. 2. Copy RXEXTRAS.DLL, found in the "/DLL" directory created when the distribution archive was unarchived, to the LIBPATH. If in doubt copy it to "/OS2/DLL" on the boot partition. 3. Edit CONFIG.SYS on the boot drive and add the following line: SET CONFIGSORT= For example, SET CONFIGSORT=H:/CFGSORT 4. Reboot the machine. 3.2 USAGE AND SYNTAX ConfigSort is command-line driven. All options are invoked, or prefixed, by keywords and are: 1. /IN This specifies the fully-qualified filename of the config.sys file to be processed. This is the only required keyword. 2. /OUT This specifies an output file for ConfigSort to write to. If this keyword is not specified then the original /IN file is backed-up with a .bak extension and then overwritten. 3. /APPCFG This specifies a fully-qualified filename for the ConfigSort applications configuration file. 4. /NOAPPS By default, multiple entries made by an application are grouped into a section at the end of the file. This keyword disables this facility. 5. /NOSORT By default, all SET statements are sorted into descending alphabetical order. This keyword disables this facility. 6. /NOUPPER By default, all lines in the processed file are turned upper-case, with the exception of the information associated with SET statements. This keyword disables this facility. 3.3 EXAMPLES This section is just intended to visualise the above into something a little more tangible. Three examples of syntax are shown below: 1. PROCESS "F:\CONFIG.SYS" (AND BACKUP TO F:\CONFIG.BAK) cfgsort /in f:\config.sys 2. PROCESS "F:\CONFIG.SYS" AND OUTPUT TO "F:\CONFIG.NEW" cfgsort /in f:\config.sys /out f:\config.new 3. PROCESS "F:\CONFIG.SYS" WITH ALL OPTIONS OFF cfgsort /in f:\config.sys /noapps /nosort /noupper 4.1 EXTERNAL CONFIGURATION FILES Unlike v1.x, ConfigSort 2.0 and above allows you to optionally configure how the program behaves upon execution. There are two files which may be used for this purpose: 1. CFGSORT.CLI This file may contain any number of command-line options which will be executed when the program runs. Thus it is perfectly possible to set the file up so that a standard configuration is processed and saved, using various options, by just invoking the cfgsort.exe program itself. As a enhancement to it's usefulness, any conflicting command-line option specified manually when invoking the program will take presidence over any similar option detailed in the file. Thus, an /IN statement in the cfgsort.cli can be overriden by an /IN statement manually specified. This file should reside in the directory which the environmental variable CONFIGSORT points to (see 3.1). There is no way to specify an optional location for this file as it would somewhat negate the point of saving typing time. ;) An example of a CFGSORT.CLI file might be: /IN F:\CONFIG.SYS /NOUPPER /NOSORT The above example would this process a config.sys file which sits in the root directory of F:\ and rename it to config.bak (see 3.2(2)). The optional switches /NOUPPER and /NOSORT are active. 2. CFGSORT.APP This is the configuration file for the applications sorting. It usually resides in the directory referenced by the CONFIGSORT environmental variable (see 3.1), but can be optionally specified using the /APPCFG keyword (see 3.2(3)) on the command-line. It is obviously necessary if applications sorting is active, ie. when the /NOAPPS keyword is not specified on the command-line. Each application section is begun with a "SECTION" keyword, followed by a *single* word identifying the application. eg. SECTION EXT2 A section is not terminated by a specific keyword, but if effectively ended when a new "SECTION" keyword is specified. The "SECTION" keyword is followed, on a separate line, by four optional prefix keywords, "DESC", "SET", "FILE" and "PATH": 1. DESC This keyword allows you to specify an identifier for the application section to be used in the processed config.sys. If this is not specified then ConfigSort will use the identifier specified with the "SECTION" keyword. eg. DESC EXT2FS LINUX FILE-SYSTEM 2. SET This keyword allows you to specify which SET statements in the config.sys file will be grouped into the current application section. Multiple statements may be included on the same line, provided that they are separated by a space, or multiple SET keywords may be used for each individual entry. eg. SET ETC TEMP LANG or eg. SET ETC SET TEMP SET LANG Notice that SET statements which contain spaces can be included by substituting an exclamation-mark for the spaces: eg. SET OS2MEMU COLORS would be SET OS2MEMU!COLORS 3. FILE This keyword allows you to specify which files in the config.sys should be grouped into the current application section. Notice that only the filename is valid, not its full path. Again, as with the "SET" keyword, multiple files may be specified on the same line or multiple keywords may be used. eg. FILE EXT2-OS2.IFS EXT2FLT.FLT EXT2_LW.EXE or eg. FILE EXT2-OS2.IFS FILE EXT2FLT.FLT FILE EXT2_LW.EXE 4. PATH This keyword allows you to specify which files in a *specific* directory should be grouped in an application section. This does not include any subdirectories. eg. PATH F:\MPTN\PROTOCOL Normally this keyword should *not* be used. It is incredibly non- specific and has the potential to completely wreck the processed config.sys if used improperly. 4.2 KNOWN APPLICATIONS The included CFGSORT.APP file contains information about the following applications: 1. ConfigSort. :) 2. EXT2FS 3. GAMEDD Joystick Drivers 4. IBM DualStor. 5. IBM EWS OS20MEMU 6. IBM MPTS (basic support). 7. IBM TCP/IP v2.0 (Bonuspak IAK). 8. IBM TCP/IP v3.0 (Warp Connect). 9. IBM WebExplorer 1.1d 10. IRCII/OS2 11. PMView 12. SIO Serial drivers. 13. SUBST/2 14. VisualAge C++ NB. 6. The knowlage of Multi-Protocol Transport Services, found in Warp Connect, is basic at best. It comprises the dial-up support drivers for TCP/IP 3.0. As I don't run a LAN based system, I can't include support for this area of MPTS and I would strongly suggest that a backup of the original file is made if you use the advanced networking facilities of Warp Connect. If you create any application sections of your own then please send them to me so I can include them with any future releases of ConfigSort. 5.1 VERSION HISTORY 2.1 15/09/96 # Fixed a bug which caused ConfigSort to incorrectly process a filename which had a fully-qualified path as a parameter when parsing an application section. + Added, erm, quite a few hard-coded OS/2 system commands (the more obscure ones) which I had promised to put into release v2.0 but had overlooked. Sorry! :( + Added some more application sections into CFGSORT.APP. Thanks to Harald Leinders and Alfred Vink for the additions of VisualAge C++ and the GAMEDD joystick driver sections respectfully. # Corrected some errors in the manual. 2.0 08/09/96 + Major revision of the application engine. Added the external configuration file CFGSORT.APP which takes over the hard-encoded functions found in previous versions and allows user-control on which application entries are processed. + Added the optional CFGSORT.CLI file so that the program could be setup with some defaults and save typing time. # Fixed a bug which caused the program to terminate with an error message when processing a particular user-error (joining two unrelated lines together which managed to satisfy some basic error checking) was encountered. # Source code generally rewritten to adopt a more modular approach. 1.3 23/06/96 # Fixed all the internal gremlins with mixed-case. + Added case-support for SET variables. Now ConfigSort will NOT alter the case of any information assigned to a variable with the SET command. This was a much requested revision. # Fixed a problem when parsing filenames without a fully-qualified path. These are typically BASEDEV entries. Previously, these entries would not get sorted into an application section. # Fixed the SET statement parsing. Previously if there was a space before or after the '=' sign the entry wouldn't get sorted into the correct section. + Added application support for PMVIEW, EXT2FS and OS20MEMU. + Modified applications support for MPTS and TCP/IP v3.0 to include the new entries made by the IBM ServicePaks. I've also removed some SET variables and placed them in an IBM related section. 1.21 19/05/96 (Unreleased) # Fixed a case-sensitivity problem with the /IN command. 1.2 14/05/96 + Added the /NOUPPER option. Previously ConfigSort changed the case of the config.sys to uppercase without option, which could cause problems with ANSI sequences for command prompts, etc. + Added support for the IBM WebExplorer 1.1b SET statements into the network sections. 1.11 28/04/96 = Added IFCONFIG.EXE to the TCP/IP applications sorting. This was an oversight and caused problems for some people. 1.1 16/04/96 - Removed the /SORT option. Previously it shuffled REM'd entries to the bottom of a configuration section, but as some drivers have to be loaded in a correct order, for example the sound drivers, unREMing those lines later caused problems if the correct order couldn't be remembered. Thus, I decided that it could be more trouble than it was worth, so it's now gone... + SET statements are now sorted into descending alphabetical order. + Added the /NOSORT option. This stops all SET statements from being sorted. - An oversight in the docs saying that the RXEXTRAS.DLL came as part of the OS/2 distribution. Apologies to those who, as a result, couldn't get the program to actually run. :( - A bug was introduced into 1.0 at the last moment due to brainfade on my part and no subsequent testing. Basically ConfigSort didn't strip out it's own REM statements which caused them to accumulate when a saved file was reprocessed. Minor but annoying. 1.0 05/04/96 First public release. 6.1 AFTERWORD ConfigSort was written as nothing else satisfied my requirements. Since the initial release I've had quite a bit of very positive feedback about the program. I would like to thank all those people who reported bugs and gave me ideas for for future releases. I would especially like to thank Gary Hammer for putting the program on his WWW site (www.os2.musthave.com/os2) as the program really seemed to take off after that, and for testing the pre-release 2.0. 6.2 CONTACTS Any suggestions or comments about ConfigSort would be very welcome. I'm available for a chat at the following addresses: internet : phil.omalley@zetnet.co.uk fidonet : "Phil O'Malley" at 2:250/107.96 Phil O'Malley, September 15th 1996.