source: hybrid/branches/releng-11/nanobsd/files/tools/update.inc.sh@ 13684

Last change on this file since 13684 was 13684, checked in by rick, 8 years ago

Typo

File size: 530 bytes
Line 
1#!/bin/sh
2
3
4
5if echo $NANO_DRIVE | grep -q '^ufs/'; then
6 NANO_LABEL=`echo $NANO_DRIVE | cut -c 5-`
7
8 # Detect GEOM drive to be updated based on the drive or label
9 GEOM_DRIVE=`glabel status | grep ${NANO_DRIVE} | awk '{print $3}' | sed -e 's/s[0-9a]*$//g' | uniq`
10
11 # Should never happen.
12 if [ `echo $GEOM_DRIVE | wc -l` -gt 1 ] ; then
13 echo "Bug: Multiple GEOM targets found with filter NANO_DRIVE=$NANO_DRIVE, unable to upgrade"
14 glabel status | sed "s/^/Bug: /g"
15 exit 1
16 fi
17else
18 NANO_LABEL=""
19 GEOM_DRIVE=$NANO_DRIVE
20fi
Note: See TracBrowser for help on using the repository browser.