From 3c74b3db97695a89b42a00c7658b5cb569f7e1e4 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 12 Oct 2012 14:26:03 -0400 Subject: [PATCH] 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 Commit-Ready: Mike Frysinger Tested-by: Mike Frysinger --- bin/cros_make_image_bootable | 10 ++++++---- mount_gpt_image.sh | 2 +- update_bootloaders.sh | 10 +++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/bin/cros_make_image_bootable b/bin/cros_make_image_bootable index 03ce3d0c9f..e9acf310f8 100755 --- a/bin/cros_make_image_bootable +++ b/bin/cros_make_image_bootable @@ -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. diff --git a/mount_gpt_image.sh b/mount_gpt_image.sh index 51eeef5bbb..12834950bd 100755 --- a/mount_gpt_image.sh +++ b/mount_gpt_image.sh @@ -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}" diff --git a/update_bootloaders.sh b/update_bootloaders.sh index e77873ef33..3a30d1eb6d 100755 --- a/update_bootloaders.sh +++ b/update_bootloaders.sh @@ -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