| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # | 2 # |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2011 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 can change key (usually developer keys) and kernel config | 7 # This script can change key (usually developer keys) and kernel config |
| 8 # of a kernels on SSD. | 8 # of a kernels on SSD. |
| 9 | 9 |
| 10 SCRIPT_BASE="$(dirname "$0")" | 10 SCRIPT_BASE="$(dirname "$0")" |
| 11 . "$SCRIPT_BASE/common.sh" | 11 . "$SCRIPT_BASE/common_minimal.sh" |
| 12 load_shflags || exit 1 | 12 load_shflags || exit 1 |
| 13 | 13 |
| 14 # Constants used by DEFINE_* | 14 # Constants used by DEFINE_* |
| 15 VBOOT_BASE='/usr/share/vboot' | 15 VBOOT_BASE='/usr/share/vboot' |
| 16 DEFAULT_KEYS_FOLDER="$VBOOT_BASE/devkeys" | 16 DEFAULT_KEYS_FOLDER="$VBOOT_BASE/devkeys" |
| 17 DEFAULT_BACKUP_FOLDER='/mnt/stateful_partition/backups' | 17 DEFAULT_BACKUP_FOLDER='/mnt/stateful_partition/backups' |
| 18 DEFAULT_PARTITIONS='2 4' | 18 DEFAULT_PARTITIONS='2 4' |
| 19 | 19 |
| 20 # DEFINE_string name default_value description flag | 20 # DEFINE_string name default_value description flag |
| 21 DEFINE_string image "/dev/sda" "Path to device or image file" "i" | 21 DEFINE_string image "/dev/sda" "Path to device or image file" "i" |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 if [ $num_signed -gt 0 -a $num_signed -le $num_given ]; then | 273 if [ $num_signed -gt 0 -a $num_signed -le $num_given ]; then |
| 274 # signed something at least | 274 # signed something at least |
| 275 echo "Successfully re-signed $num_signed of $num_given kernel(s)" \ | 275 echo "Successfully re-signed $num_signed of $num_given kernel(s)" \ |
| 276 " on device $FLAGS_image". | 276 " on device $FLAGS_image". |
| 277 else | 277 else |
| 278 err_die "Failed re-signing kernels." | 278 err_die "Failed re-signing kernels." |
| 279 fi | 279 fi |
| 280 } | 280 } |
| 281 | 281 |
| 282 main | 282 main |
| OLD | NEW |