- Timestamp:
- May 13, 2012, 2:10:04 PM (13 years ago)
- Location:
- branches/releng-9.0/nanobsd/tools
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/releng-9.0/nanobsd/tools/image
r10799 r10830 20 20 # build force kernel - Build NanoBSD and force rebuilding the kernel 21 21 # build force world - Build NanoBSD and force rebuilding world 22 # config [for <node>] - Configure image to be used for <node> 22 23 # rebuild - Rebuild NanoBSD (aka force rebuilding all) 23 24 # deploy on <node> [and reboot] - Deploy the image on node and reboot if needed … … 51 52 ssh $host reboot 52 53 fi 54 } 55 56 config_image() { 57 node_name=${1:+"-b -c $1"} 58 59 img=$OBJDIR/_.disk.full 60 61 mnt=`mktemp -d -t $(basename $0)` 62 md=`mdconfig -a -t vnode -f $img` 63 64 # Clean up when done 65 trap "umount $mnt/dev; umount $mnt/cfg; umount $mnt; mdconfig -d -u $md; rm -d $mnt" 0 66 trap "exit 1" 1 2 3 15 67 68 # Root filesystem 69 mount /dev/${md}s1a $mnt || exit 1 70 71 # /dev/null in chroot 72 mount -t devfs devfs ${mnt}/dev || exit 1 73 74 # Config files lives at /cfg location 75 mount /dev/${md}s3 $mnt/cfg || exit 1 76 77 # Try to fetch and store config 78 chroot $mnt /tools/wl-config -d -n -m startup $node_name || exit 1 53 79 } 54 80 … … 176 202 echo "Arguments Error - '$*'"; exit 128 177 203 fi 204 elif [ "$1" = "config" ]; then 205 if [ "$2" = "for" ]; then 206 if [ -n "$3" ]; then 207 node_name=$3 208 else 209 echo "Arguments Error - '$*'"; exit 128 210 fi 211 else 212 echo "Arguments Error - '$*'"; exit 128 213 fi 214 config_image $node_name 178 215 else 179 216 echo "Argument Error - '$1'"; exit 128
Note:
See TracChangeset
for help on using the changeset viewer.