##############################################################################
#   Modules Revision 3.0
#   Providing a flexible user environment
#
#   File:		modules.50-cmds/%M%
#   Revision:		%I%
#   First Edition:	95/12/06
#   Last Mod.:		%U%, %G%
#
#   Authors:		Jens Hamisch, Jens.Hamisch@Strawberry.COM
#
#   Description:	Testuite testsequence
#   Command:		
#   Modulefiles:	
#   Sub-Command:
#
#   Comment:	%C{
#			Checks, whether 'uname' is configured and retrieves
#			all data required for the tests from the configuration
#			file.
#		}C%
#
##############################################################################

#
#  Check the configuration
#

set u_sysname $tcl_platform(os)
set u_release $tcl_platform(osVersion)
set u_machine $tcl_platform(machine)


#
#  set up variables relative to uname check
#

set uname_warn "$error_msgs: Command 'uname' cannot be found"

#  check where to find the 'uname' binary on this system
set uname [auto_execok uname]
if {$uname eq ""} {
    if { $verbose > 0 } {
        send_user "\tNo executable 'uname' binary found ...\n"
    }
    set u_nodename "unknown"
    set u_version "unknown"
} else {
    if { $verbose > 0 } {
        send_user "\tUsing '$uname' for uname checking ...\n"
    }
	set u_nodename [exec $uname -n]
	set u_version [exec $uname -v]
}

#
#  set up variables relative to domainname check
#

if {$domainname eq ""} {
    if { $verbose > 0 } {
        send_user "\tNo executable 'domainname' found ...\n"
    }
    set u_domain "unknown"
} else {
    if { $verbose > 0 } {
        send_user "\tUsing '$domainname' for domainname checking ...\n"
    }
    set u_domain [exec $domainname]
}

#
#  Verbosity
#

if { $verbose > 0 } {
    send_user "   Uname defaults:\n"
    send_user "        system name      $u_sysname\n"
    send_user "        node name        $u_nodename\n"
    send_user "        domain name      $u_domain\n"
    send_user "        release          $u_release\n"
    send_user "        version          $u_version\n"
    send_user "        machine          $u_machine\n"
}

#
#  Cleanup
#

