| OLD | NEW | 
|   1 #!/bin/sh |   1 #!/bin/sh -e | 
|   2  |   2  | 
|   3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |   3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 
|   4 # Use of this source code is governed by a BSD-style license that can be |   4 # Use of this source code is governed by a BSD-style license that can be | 
|   5 # found in the LICENSE file. |   5 # found in the LICENSE file. | 
|   6  |   6  | 
|   7 # This script is called after an AutoUpdate or USB install. |   7 # This script is called after an AutoUpdate or USB install. The first argument | 
|   8 set -e |   8 # is the partition where the new rootfs is installed. The autoupdate invocation | 
 |   9 # will provide a second argument, specifying the partition for the new kernel. | 
|   9  |  10  | 
|  10 # update /boot/extlinux.conf |  11 # Update /boot/extlinux.conf. | 
|  11 INSTALL_ROOT=`dirname "$0"` |  12 INSTALL_ROOT=`dirname "$0"` | 
|  12 INSTALL_DEV="$1" |  13 INSTALL_DEV="$1" | 
 |  14 KINSTALL_DEV="$2" | 
|  13  |  15  | 
|  14 # set default label to chromeos-hd |  16  | 
 |  17 # Set default label to chromeos-hd. | 
|  15 sed -i 's/^DEFAULT .*/DEFAULT chromeos-hd/' "$INSTALL_ROOT"/boot/extlinux.conf |  18 sed -i 's/^DEFAULT .*/DEFAULT chromeos-hd/' "$INSTALL_ROOT"/boot/extlinux.conf | 
|  16 sed -i "{ s:HDROOT:$INSTALL_DEV: }" "$INSTALL_ROOT"/boot/extlinux.conf |  19 sed -i "{ s:HDROOT:$INSTALL_DEV: }" "$INSTALL_ROOT"/boot/extlinux.conf | 
|  17  |  20  | 
|  18 # NOTE: The stateful partition will not be mounted when this is |  21 # NOTE: The stateful partition will not be mounted when this is called at | 
|  19 # called at USB-key install time. |  22 # USB-key install time. It will be mounted following an upgrade. ChromeOS | 
 |  23 # hardware expects the kernel to be in a partition of its own. Legacy systems | 
 |  24 # will use syslinux to boot from the kernel image found in the rootfs. | 
 |  25 # TODO: The ChromeOS kernel partition will contain a signature header, a config | 
 |  26 # file, and the kernel image as a single blob. We'll need to revisit this to | 
 |  27 # ensure that gets installed properly. | 
 |  28 if [ -n "$KINSTALL_DEV" ]; then | 
 |  29   dd if=${INSTALL_ROOT}/boot/vmlinuz of=${KINSTALL_DEV} | 
 |  30 fi | 
| OLD | NEW |