% man testlicense testlicense(1) Daylight Programs testlicense(1) NAME testlicense - verify that a Daylight license is valid. UNIX SYNOPSIS testlicense [-i|-v|-t|-p|-s name] DESCRIPTION testlicense invokes Daylight's license-checking functions to verify that a Daylight license is valid. It has three uses: To verify that a newly-installed system's license is valid and the environment variables (e.g. DY_ROOT) are correct. In shell scripts and makefiles to test for specific licenses, such as to decide whether or not particular program should be compiled. During installation, the "-i" option will print the CPU ID information needed for your license (see below). OPTIONS -i Don't check the license; instead, print the identifying information for this particular machine (i.e. for the "cpu type:" and "cpu idno:" lines of the license file). The output is suitable for using directly in the license file. -v Give verbose information about the license processing, including the license sources used and the complete set of features licensed. Extremely useful for debugging. -t name Test if Daylight Toolkit name is licensed; return zero exit status if it is, or nonzero if not. -p name Test if Daylight application program name is licensed; return zero exit status if it is, or nonzero if not. -s name Test if Daylight servers are authorize to use the ser- vice name (from /etc/services); return zero exit status if name is an authorized service, or nonzero if not. (Note that it is services, not servers, that are licensed.) -t any -p any -s any In the special case where name is "any", testlicense checks only that the license is valid and returns zero status if it is. It does not check for any particular program, toolkit, or service. RETURNS Returns status zero if the license is found and is valid, or one if the license is invalid or can't be found. If there is a problem, a diagnostic message is printed. The '-v' option can then be used to debug the difficulty. EXAMPLES $DY_ROOT/bin/testlicense Test for a valid license and print (on standard output) a list of licensed products. $DY_ROOT/bin/testlicense -i Print the machine's identifying information, e.g. on a Sun, it might print: cpu type: sun4u cpu idno: 80abcdef identity: cpu,sun4u,80abcdef identity: ipv4,192.168.0.1 The following small sh(1) shell script will print a textual indication of whether the SMILES toolkit is licensed: #!/bin/sh if testlicense -t smiles ; then echo "SMILES Toolkit is licensed" else echo "SMILES Toolkit is not licensed" fi FILES $DY_ROOT/bin/testlicense SEE ALSO licensing(5), Daylight Theory Manual Daylight v4.81 Release Date: 20 Dec 2002 2