]> git.entuzijast.net Git - imunes.git/commitdiff
Shell command changed to bash, tcsh, sh -> the first one found.
authormiljenko <miljenko>
Wed, 7 Dec 2005 11:48:16 +0000 (11:48 +0000)
committermiljenko <miljenko>
Wed, 7 Dec 2005 11:48:16 +0000 (11:48 +0000)
Bug found by:
Submitted by:
Requested by:
Reviewed by:
Approved by:
Obtained from:

host.tcl
pc.tcl

index c06fd3e5c6eb5ccf1df39c94ae239906bc37ace0..a8d7fba05f4627cc22bfd9b0467ed3a6dc565734 100755 (executable)
--- 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 704a1158a4ee48cc9d5204729bf95140e3364582..d8e7c02497152ce2b7a2c099c49e43a9b8afd950 100755 (executable)
--- 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"
+        }
     }
 }