Changeset 10982 in hybrid


Ignore:
Timestamp:
May 22, 2012, 9:29:00 PM (13 years ago)
Author:
rick
Message:

Horible broke update script for 8.x -> 9.x. Do reverse and apply awefull hack
to make sure we re-write the fstab properly if needed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-9.0/nanobsd/tools/image

    r10871 r10982  
    4545  sleep $prompt_timeout
    4646
     47  # Details and alive checkings
    4748  ssh $host mount || exit 1
     49  P=`ssh $HOST df / | grep '1a ' && echo "p2" || echo "p1"` || exit 1
     50  echo "# Updating partition $P"
     51
     52  cat $img | ssh $host sh -x /tools/update$P || exit 1
     53
    4854  # Hack to make sure we update the fstab the right way when converting from
    4955  # 8.X-RELEASE to 9.X-RELEASE. ad0 naming changed to ada0.
    50   ssh $HOST 'echo NANO_DRIVE=ada0 > /etc/nanobsd.conf' || exit 1
    51   cat $img | ssh $host /tools/update || exit 1
     56  if [ "$P" = "p2" ]; then
     57    ssh $HOST sed -i "" "s/ada0s1/ada0s2/" /mnt/conf/base/etc/fstab /mnt/etc/fstab || exit 1
     58  fi
     59
    5260  if $do_reboot; then
    5361    ssh $host reboot
Note: See TracChangeset for help on using the changeset viewer.