Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
13382ee5
Commit
13382ee5
authored
Mar 15, 2012
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Version of Linux MFS startup script used in secure MFS.
parent
ceaa2539
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
104 additions
and
0 deletions
+104
-0
tools/tspitests/S60testbed
tools/tspitests/S60testbed
+104
-0
No files found.
tools/tspitests/S60testbed
0 → 100755
View file @
13382ee5
#!/bin/sh
#
# Do Emulab stuff
#
if
[
-f
/etc/emulab/paths.sh
]
;
then
.
/etc/emulab/paths.sh
else
BINDIR
=
/etc/testbed
fi
mode
=
admin
start
()
{
for
token
in
`
cat
/proc/cmdline
`
;
do
case
$token
in
elab_mode
=
*
)
mode
=
${
token
##*=
}
;;
esac
done
# if newnode, there is no DB state for quotes
if
[
"
$mode
"
=
"newnode"
]
;
then
echo
"FATAL: secure MFS does not support 'newnode'"
sleep
5
/sbin/reboot
fi
echo
"Starting secure MFS in
\"
$mode
\"
mode"
script
=
""
scriptarg
=
""
if
[
-x
$BINDIR
/script1.sh
]
;
then
if
$BINDIR
/script1.sh
;
then
scriptarg
=
"-secure"
else
echo
"WARNING: secure setup failed, dropping to MFS"
mode
=
"admin"
fi
fi
case
$mode
in
admin
)
script
=
$BINDIR
/rc/rc.mfs
scriptarg
=
"boot"
;;
frisbee
)
if
$BINDIR
/rc/rc.frisbee
$scriptarg
;
then
echo
"Disk load done"
;
else
echo
"WARNING: disk load failed, continuing anyway"
fi
script
=
""
scriptarg
=
""
;;
*
)
echo
"Invalid mode, dropping to MFS"
1>&2
script
=
$BINDIR
/rc/rc.mfs
scriptarg
=
"boot"
;;
esac
# must sign-off before executing any further scripts
if
[
-x
$BINDIR
/script2.sh
]
;
then
if
$BINDIR
/script2.sh
;
then
echo
"Signed off from secure MFS"
else
echo
"WARNING: TPM sign-off failed"
script
=
""
fi
fi
if
[
-z
"
$script
"
]
;
then
echo
"Rebooting ..."
sleep
2
/sbin/reboot
fi
echo
"Starting
${
script
##*/
}
..."
$script
$scriptarg
exit
$?
}
stop
()
{
:
}
restart
()
{
:
}
case
"
$1
"
in
start
)
start
;;
stop
)
stop
;;
restart|reload
)
restart
;;
*
)
echo
$"Usage:
$0
{start|stop|restart}"
exit
1
esac
exit
$?
Write
Preview
Markdown
is supported
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