| 1 | #!/bin/bash |
| 2 | |
| 3 | # Copyright 2010 The ChromiumOS Authors |
| 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | |
| 7 | # Remove the test label from lsb-release to prepare an image for |
| 8 | # signing using the official keys. |
| 9 | |
| 10 | # Load common constants and variables. |
| 11 | . "$(dirname "$0")/common.sh" |
| 12 | |
| 13 | set -e |
| 14 | image=$1 |
| 15 | |
| 16 | loopdev=$(loopback_partscan "${image}") |
| 17 | rootfs=$(make_temp_dir) |
| 18 | mount_loop_image_partition "${loopdev}" 3 "${rootfs}" |
| 19 | sed -i 's/test//' "${rootfs}/etc/lsb-release" |
| 20 | restore_lsb_selinux "${rootfs}/etc/lsb-release" |