From 2314e5f7397b56571281d4d5df0fb6a1a12a1024 Mon Sep 17 00:00:00 2001 From: miljenko Date: Wed, 7 Dec 2005 11:48:16 +0000 Subject: [PATCH] Shell command changed to bash, tcsh, sh -> the first one found. Bug found by: Submitted by: Requested by: Reviewed by: Approved by: Obtained from: --- host.tcl | 13 +++++++++---- pc.tcl | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/host.tcl b/host.tcl index c06fd3e..a8d7fba 100755 --- a/host.tcl +++ b/host.tcl @@ -79,11 +79,16 @@ proc $MODULE.bootcmd { node } { proc $MODULE.shellcmd { node } { - global env - if { [catch {set s $env(SHELL)}] } { - return "/bin/sh" + set ret [nexec whereis -b bash] + if { [llength $ret] == 2 } { + return [lindex $ret 1] } else { - return "$s" + set ret [nexec whereis -b tcsh] + if { [llength $ret] == 2 } { + return [lindex $ret 1] + } else { + return "/bin/sh" + } } } diff --git a/pc.tcl b/pc.tcl index 704a115..d8e7c02 100755 --- a/pc.tcl +++ b/pc.tcl @@ -76,11 +76,16 @@ proc $MODULE.bootcmd { node } { proc $MODULE.shellcmd { node } { - global env - if { [catch {set s $env(SHELL)}] } { - return "/bin/sh" + set ret [nexec whereis -b bash] + if { [llength $ret] == 2 } { + return [lindex $ret 1] } else { - return "$s" + set ret [nexec whereis -b tcsh] + if { [llength $ret] == 2 } { + return [lindex $ret 1] + } else { + return "/bin/sh" + } } } -- 2.39.5