Commit 02f3b381 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Hook in the os_setup script.

parent 1eb884ac
...@@ -44,6 +44,7 @@ set libir "$scriptdir/ir/libir.tcl" ...@@ -44,6 +44,7 @@ set libir "$scriptdir/ir/libir.tcl"
set ir2ifc "$scriptdir/ir2ifc" set ir2ifc "$scriptdir/ir2ifc"
set ifcboot "$scriptdir/ifc_setup" set ifcboot "$scriptdir/ifc_setup"
set delay_setup "$scriptdir/delay_setup" set delay_setup "$scriptdir/delay_setup"
set os_setup "$scriptdir/os_setup"
source $libir source $libir
namespace import TB_LIBIR::ir namespace import TB_LIBIR::ir
...@@ -54,6 +55,8 @@ if {$argc != 3} { ...@@ -54,6 +55,8 @@ if {$argc != 3} {
} }
# ignore pid and eid for the moment. # ignore pid and eid for the moment.
set pid [lindex $argv 0]
set eid [lindex $argv 1]
set irFile [lindex $argv 2] set irFile [lindex $argv 2]
set t [split $irFile .] set t [split $irFile .]
set prefix [join [lrange $t 0 [expr [llength $t] - 2]] .] set prefix [join [lrange $t 0 [expr [llength $t] - 2]] .]
...@@ -113,7 +116,13 @@ readfifo $tmpioFP "SNMPIT: " ...@@ -113,7 +116,13 @@ readfifo $tmpioFP "SNMPIT: "
#} #}
outs "PLACEHOLDER - Copying disk images." outs "PLACEHOLDER - Copying disk images."
outs "PLACEHOLDER - Booting for the first time."
outs "Resetting OS and rebooting."
if {[catch "exec $os_setup $pid $eid $irFile >@ $logFp 2>@ $logFp" err]} {
outs stderr "Error running $os_setup. ($err)"
exit 1
}
outs "PLACEHOLDER - Verifying OS functionality." outs "PLACEHOLDER - Verifying OS functionality."
# XXX - This should only be done for linux/freebsd OSs # XXX - This should only be done for linux/freebsd OSs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment