quiet down grep/dd output

This removes some spurious noise from the build_image output.

BUG=None
TEST=`./build_image` still worked and is quieter

Change-Id: Ic5d89a462dc137a1a710f77dc16cee401e0083b2
Reviewed-on: https://gerrit.chromium.org/gerrit/35426
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
Mike Frysinger 2012-10-12 14:26:03 -04:00 committed by Gerrit
parent b797d74253
commit 3c74b3db97
3 changed files with 12 additions and 10 deletions

View File

@ -270,7 +270,8 @@ make_image_bootable() {
seek=${hash_offset} \
if="${FLAGS_rootfs_hash}" \
of="${image}" \
conv=notrunc
conv=notrunc \
status=noxfer
# Move the verification block needed for the hard disk install to the
# stateful partition. Mount stateful fs, copy file, and umount fs.
@ -282,7 +283,7 @@ make_image_bootable() {
local koffset="$(partoffset ${image} 2)"
sudo dd if="${FLAGS_output_dir}/vmlinuz.image" of="${image}" \
conv=notrunc bs=512 seek=${koffset}
conv=notrunc bs=512 seek=${koffset} status=noxfer
# Update the bootloaders. The EFI system partition will be updated.
local kernel_part=
@ -330,7 +331,7 @@ make_image_bootable() {
info "copy the squashfs to the partition"
local part_offset="$(partoffset ${image} 3)"
sudo dd bs=512 if="${squashfs_img}" of="${image}" \
seek=${part_offset} conv=notrunc
seek=${part_offset} conv=notrunc status=noxfer
sudo rm "${squashfs_img}"
fi
}
@ -341,7 +342,8 @@ verify_image_rootfs() {
local rootfs_tmp_file=$(mktemp)
trap "rm ${rootfs_tmp_file}" EXIT
sudo dd if="${image}" of="${rootfs_tmp_file}" bs=512 skip="${rootfs_offset}"
sudo dd if="${image}" of="${rootfs_tmp_file}" bs=512 skip="${rootfs_offset}" \
status=noxfer
# This flips the read-only compatibility flag, so that
# e2fsck does not complain about unknown file system capabilities.

View File

@ -80,7 +80,7 @@ unmount_image() {
# Don't die on error to force cleanup
set +e
# Reset symlinks in /usr/local.
if mount | egrep ".* ${FLAGS_stateful_mountpt} .*\(rw,"; then
if mount | egrep -q ".* ${FLAGS_stateful_mountpt} .*\(rw,"; then
setup_symlinks_on_root "/usr/local" "/var" \
"${FLAGS_stateful_mountpt}"
fix_broken_symlinks "${FLAGS_rootfs_mountpt}"

View File

@ -90,30 +90,30 @@ if ! type -p update_x86_bootloaders; then
-e "s|DMTABLEB|${grub_dm_table_b}|g" \
-e "s|cros_legacy|${cros_flags}|g" \
"${template_dir}"/efi/boot/grub.cfg |
sudo dd of="${esp_fs_dir}"/efi/boot/grub.cfg
sudo dd of="${esp_fs_dir}"/efi/boot/grub.cfg status=noxfer
sed -e "s|/dev/\\\$linuxpartA|${root_a_uuid}|g" \
-e "s|/dev/\\\$linuxpartB|${root_b_uuid}|g" \
"${template_dir}"/efi/boot/grub.cfg |
sudo dd of="${esp_fs_dir}"/efi/boot/grub.cfg
sudo dd of="${esp_fs_dir}"/efi/boot/grub.cfg status=noxfer
# Rewrite syslinux DM_TABLE
syslinux_dm_table_usb=${dm_table//${old_root}/${root_a_uuid}}
sed -e "s|DMTABLEA|${syslinux_dm_table_usb}|g" \
-e "s|cros_legacy|${cros_flags}|g" \
"${template_dir}"/syslinux/usb.A.cfg |
sudo dd of="${esp_fs_dir}"/syslinux/usb.A.cfg
sudo dd of="${esp_fs_dir}"/syslinux/usb.A.cfg status=noxfer
syslinux_dm_table_a=${dm_table//${old_root}/HDROOTA}
sed -e "s|DMTABLEA|${syslinux_dm_table_a}|g" \
-e "s|cros_legacy|${cros_flags}|g" \
"${template_dir}"/syslinux/root.A.cfg |
sudo dd of="${esp_fs_dir}"/syslinux/root.A.cfg
sudo dd of="${esp_fs_dir}"/syslinux/root.A.cfg status=noxfer
syslinux_dm_table_b=${dm_table//${old_root}/HDROOTB}
sed -e "s|DMTABLEB|${syslinux_dm_table_b}|g" \
-e "s|cros_legacy|${cros_flags}|g" \
"${template_dir}"/syslinux/root.B.cfg |
sudo dd of="${esp_fs_dir}"/syslinux/root.B.cfg
sudo dd of="${esp_fs_dir}"/syslinux/root.B.cfg status=noxfer
# Copy the vmlinuz's into place for syslinux
sudo cp -f "${template_dir}"/vmlinuz "${esp_fs_dir}"/syslinux/vmlinuz.A