Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
9b3185c5
Commit
9b3185c5
authored
Dec 12, 2002
by
Mike Hibler
Browse files
Latest version: turn on IPoD, check return value from frisbee
parent
f906a1a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
tmcd/freebsd/rc.frisbee
View file @
9b3185c5
...
...
@@ -5,36 +5,51 @@
# All rights reserved.
#
TMCC
=
/etc/testbed/tmcc
DISKDEV
=
/dev/rad0
$TMCC
state RELOADSETUP
LOADINFO
=
`
$TMCC
loadinfo
`
if
[
-r
/etc/emulab/paths.sh
]
;
then
.
/etc/emulab/paths.sh
else
BINDIR
=
/etc/testbed
fi
# For testing purposes.
#LOADINFO='ADDR=234.5.6.69:4444 PART=0'
$BINDIR
/tmcc state RELOADSETUP
DISKDEV
=
/dev/ad0
LOADINFO
=
`
$BINDIR
/tmcc loadinfo
`
#LOADINFO='ADDR=234.5.6.69:4444 PART=0' # for testing
ADDRESS
=
`
echo
$LOADINFO
|
awk
-F
=
'{ printf $2 }'
|
awk
-F
' '
'{ print $1 }'
`
PARTITION
=
`
echo
$LOADINFO
|
awk
-F
=
'{ printf $3 }'
`
if
[
x
"
$PARTITION
"
!=
x
]
&&
[
"
$PARTITION
"
!=
0
]
;
then
SLICE
=
"-s
$PARTITION
"
;
fi
# Enable IPoD
if
[
-r
$BINDIR
/rc.ipod
]
;
then
.
$BINDIR
/rc.ipod
fi
if
[
x
"
$ADDRESS
"
!=
x
]
;
then
PORT
=
`
echo
$ADDRESS
|
awk
-F
:
'{ printf $2 }'
`
;
MCAST
=
`
echo
$ADDRESS
|
awk
-F
:
'{ printf $1 }'
`
;
MCASTADDR
=
"-m
$MCAST
-p
$PORT
"
;
/bin/echo
"Running /etc/testbed/frisbee
$SLICE
$MCASTADDR
$DISKDEV
"
;
$TMCC
state RELOADING
;
/etc/testbed/frisbee
$SLICE
$MCASTADDR
$DISKDEV
;
/bin/echo
"Frisbee run finished"
;
/bin/echo
"Resizing final disk partition"
;
/etc/testbed/growdisk
-vW
;
/bin/echo
"Image load complete, rebooting ..."
;
$TMCC
state RELOADDONE
;
/sbin/reboot &
echo
"Running
$BINDIR
/frisbee
$SLICE
$MCASTADDR
$DISKDEV
"
;
$BINDIR
/tmcc state RELOADING
;
$BINDIR
/frisbee
$SLICE
$MCASTADDR
$DISKDEV
;
case
$?
in
0
)
echo
"Frisbee run finished"
;
echo
"Resizing final disk partition"
;
$BINDIR
/growdisk
-vW
;
echo
"Image load complete, rebooting ..."
;
$BINDIR
/tmcc state RELOADDONE
;
/sbin/reboot
;
;;
*
)
echo
"Frisbee run failed, status
$?
"
;;
esac
else
echo
"Unable to get address for loading image"
fi
echo
"Failed to load disk, dropping to login prompt"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment