Changeset 11010 in hybrid for branches/releng-9.0/nanobsd/tools
- Timestamp:
- May 26, 2012, 3:05:45 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/releng-9.0/nanobsd/tools/image
r11009 r11010 43 43 $do_reboot && p_warn "AND will REBOOT the $host" 44 44 p_warn "Please do mind to use your ssh key else you be required to type the root" 45 p_warn "password AT LEAST 5 times"45 p_warn "password AT MOST 5 times" 46 46 47 47 … … 50 50 51 51 # Details and alive checkings 52 ssh $host mount || exit 1 53 P=`ssh $HOST df / | grep '1a ' && echo "p2" || echo "p1"` || exit 1 54 echo "# Updating partition $P" 55 56 cat $img | ssh $host sh -x /tools/update$P || exit 1 57 58 # Hack to make sure we update the fstab the right way when converting from 59 # 8.X-RELEASE to 9.X-RELEASE. ad0 naming changed to ada0. 60 if [ "$P" = "p2" ]; then 61 cat <<'EOF' | ssh $HOST sh -x || exit 1 52 release=`ssh $host mount | grep 'ada0' && echo "9.0-RELEASE" || echo "PRE-9.0-RELEASE"` || exit 1 53 if [ $release = "9.0-RELEASE" ]; then 54 cat $img | ssh $host sh -x /tools/update || exit 1 55 else 56 # Hack to make sure we update the fstab the right way when converting from 57 # 8.X-RELEASE to 9.X-RELEASE. ad0 naming changed to ada0. 58 P=`ssh $HOST df / | grep '1a ' && echo "p2" || echo "p1"` || exit 1 59 echo "# Updating partition $P" 60 61 cat $img | ssh $host sh -x /tools/update$P || exit 1 62 63 if [ "$P" = "p2" ]; then 64 cat <<EOF | ssh $HOST sh -x || exit 1 62 65 mount -uwo noatime /dev/ad0s2a 63 66 sed -i "" "s/ada0s1/ada0s2/" /mnt/conf/base/etc/fstab /mnt/etc/fstab 64 67 umount 65 68 EOF 66 69 fi 67 70 fi 68 71
Note:
See TracChangeset
for help on using the changeset viewer.