global env

set kill /bin/kill

if {[file exists /bin/sleep]} {
    set sleep /bin/sleep
} else {
    set sleep /usr/bin/sleep
}

set kpasswd_v4 /usr/athena/bin/kpasswd
set ovpasswd $env(TOP)/kpasswd/kpasswd
set kadmin_local $env(TOP)/cli/kadmin.local
set remove_changepw_perms $srcdir/remove_changepw_perms.sh
set getpid $srcdir/getpid.sh
set ovsec_adm_server_path $env(TOP)/server
set ovsec_adm_server_name ./kadmind
set ovsec_edit_keytab $env(TOP)/keytab/kadm5_keytab
set hostname [exec hostname]

# change-password.exp sends ^C to kpasswd to kill it; on HP-UX the
# default intr character is DEL, and setting it on all platforms
# won't hurt
set stty_init "intr \\^c"

if {[info commands exp_version] != {}} {
	set exp_version_4 [regexp {^4} [exp_version]]
} else {
	set exp_version_4 [regexp {^4} [expect_version]]
}

# Backward compatibility until we're using expect 5 everywhere
if {$exp_version_4} {
	global wait_error_index wait_errno_index wait_status_index
	set wait_error_index 0
	set wait_errno_index 1
	set wait_status_index 1
} else {
	set wait_error_index 2
	set wait_errno_index 3
	set wait_status_index 3
}
