Last change
on this file since 10608 was 10608, checked in by rick, 13 years ago |
The conditional statements and variables where not set correctly at all (last
commit properly done too late).
While here:
- Cleanup logging format to logger, as all but the PREINIT hooks get called
in privileged [priv] (forked) environment, where stdout goes to nothing.
- Print more details to yield more logic to the user.
Related-To: nodefactory#129
|
-
Property svn:eol-style
set to
LF
-
Property svn:executable
set to
*
|
File size:
580 bytes
|
Rev | Line | |
---|
| 1 | #!/bin/sh
|
---|
| 2 | #
|
---|
| 3 | # Upload image to node and flash partition
|
---|
| 4 | #
|
---|
| 5 | # Rick van der Zwet <info@rickvanderzwet.nl>
|
---|
| 6 |
|
---|
| 7 | . $(dirname $0)/package-build.inc.sh
|
---|
| 8 |
|
---|
| 9 | if [ -z "$1" ]; then
|
---|
| 10 | echo "Usage: $0 <host1> [<host2> <host3> ..]" 1>&2
|
---|
| 11 | exit 128
|
---|
| 12 | fi
|
---|
| 13 |
|
---|
| 14 | BASEDIR=`dirname $0`
|
---|
| 15 | CFG="${BASEDIR}/../cfg/nanobsd.wleiden"
|
---|
| 16 |
|
---|
| 17 | # Find object directory
|
---|
| 18 | eval `grep '^NANO_NAME=' ${CFG}`
|
---|
| 19 | OBJDIR="/usr/obj/nanobsd.${NANO_NAME}"
|
---|
| 20 | IMG=${IMG:-${OBJDIR}/_.disk.image}
|
---|
| 21 |
|
---|
| 22 | if [ ! -r "${IMG}" ]; then
|
---|
| 23 | p_err Source ${IMG} does not exists
|
---|
| 24 | fi
|
---|
| 25 |
|
---|
| 26 | for HOST in $*; do
|
---|
| 27 | cat $IMG | ssh -oBatchMode=yes $HOST /tools/update-wrapper
|
---|
| 28 | done
|
---|
| 29 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.