Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-image
Commits
7f6bd8e0
Commit
7f6bd8e0
authored
Oct 03, 2011
by
Nikos Skalkotos
Browse files
Add result file support in helper
Helper always outputs the result to the second serial port (ttyS1).
parent
2f221381
Changes
2
Hide whitespace changes
Inline
Side-by-side
helper/common.sh
View file @
7f6bd8e0
...
...
@@ -27,8 +27,7 @@
# those of the authors and should not be interpreted as representing official
# policies, either expressed or implied, of GRNET S.A.
OUTPUT
=
/dev/ttyS0
RESULT
=
/dev/ttyS2
RESULT
=
/dev/ttyS1
FLOPPY_DEV
=
/dev/fd0
PATH
=
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
...
...
@@ -40,7 +39,7 @@ RESIZE2FS=resize2fs
CLEANUP
=(
)
log_error
()
{
echo
"
$@
"
>
&2
echo
"
ERROR:
$@
"
|
tee
$RESULT
>
&2
exit
1
}
...
...
@@ -119,7 +118,4 @@ cleanup() {
trap
cleanup EXIT
# Redirect stdout and stderr
exec
&>
$OUTPUT
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
helper/rc.local.in
View file @
7f6bd8e0
...
...
@@ -70,6 +70,8 @@ fi
echo
"Execute all snf-image tasks...."
$RUN_PARTS
-v
--exit-on-error
"/usr/lib/snf-image/tasks"
echo
"SUCCESS"
>
$RESULT
cleanup
trap
- 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