diff options
author | Darren Hart <dvhart@linux.intel.com> | 2014-07-21 22:45:57 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-23 21:59:14 +0100 |
commit | ce3857994a0055a0e47b97771ec8ffc5b28e32f4 (patch) | |
tree | 1fb550d1cb9820daee9ce41c7a5e7e38b7902689 /scripts | |
parent | acfe054e32b9e60db3970d7546e759b37fde74c2 (diff) | |
download | poky-ce3857994a0055a0e47b97771ec8ffc5b28e32f4.tar.gz |
mkefidisk.sh: Fix redirection to 1
The current script intends to redirect stderr to stdout, but instead
redirects to a file named 1. No doubt a regex replace error.
Replace all instances of 2>1 with 2>&1.
(From OE-Core rev: 1864ca9751c28cca248cfba77a3d23fc58ff43bb)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/contrib/mkefidisk.sh | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/scripts/contrib/mkefidisk.sh b/scripts/contrib/mkefidisk.sh index ba2b56393b..28cfb6dd54 100755 --- a/scripts/contrib/mkefidisk.sh +++ b/scripts/contrib/mkefidisk.sh | |||
@@ -257,22 +257,22 @@ echo "" | |||
257 | info "Partitioning installation media ($DEVICE)" | 257 | info "Partitioning installation media ($DEVICE)" |
258 | 258 | ||
259 | debug "Deleting partition table on $DEVICE" | 259 | debug "Deleting partition table on $DEVICE" |
260 | dd if=/dev/zero of=$DEVICE bs=512 count=2 >$OUT 2>1 || die "Failed to zero beginning of $DEVICE" | 260 | dd if=/dev/zero of=$DEVICE bs=512 count=2 >$OUT 2>&1 || die "Failed to zero beginning of $DEVICE" |
261 | 261 | ||
262 | debug "Creating new partition table (MSDOS) on $DEVICE" | 262 | debug "Creating new partition table (MSDOS) on $DEVICE" |
263 | parted $DEVICE mklabel msdos >$OUT 2>1 || die "Failed to create MSDOS partition table" | 263 | parted $DEVICE mklabel msdos >$OUT 2>&1 || die "Failed to create MSDOS partition table" |
264 | 264 | ||
265 | debug "Creating boot partition on $BOOTFS" | 265 | debug "Creating boot partition on $BOOTFS" |
266 | parted $DEVICE mkpart primary 0% $BOOT_SIZE >$OUT 2>1 || die "Failed to create BOOT partition" | 266 | parted $DEVICE mkpart primary 0% $BOOT_SIZE >$OUT 2>&1 || die "Failed to create BOOT partition" |
267 | 267 | ||
268 | debug "Enabling boot flag on $BOOTFS" | 268 | debug "Enabling boot flag on $BOOTFS" |
269 | parted $DEVICE set 1 boot on >$OUT 2>1 || die "Failed to enable boot flag" | 269 | parted $DEVICE set 1 boot on >$OUT 2>&1 || die "Failed to enable boot flag" |
270 | 270 | ||
271 | debug "Creating ROOTFS partition on $ROOTFS" | 271 | debug "Creating ROOTFS partition on $ROOTFS" |
272 | parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END >$OUT 2>1 || die "Failed to create ROOTFS partition" | 272 | parted $DEVICE mkpart primary $ROOTFS_START $ROOTFS_END >$OUT 2>&1 || die "Failed to create ROOTFS partition" |
273 | 273 | ||
274 | debug "Creating swap partition on $SWAP" | 274 | debug "Creating swap partition on $SWAP" |
275 | parted $DEVICE mkpart primary $SWAP_START 100% >$OUT 2>1 || die "Failed to create SWAP partition" | 275 | parted $DEVICE mkpart primary $SWAP_START 100% >$OUT 2>&1 || die "Failed to create SWAP partition" |
276 | 276 | ||
277 | if [ $DEBUG -eq 1 ]; then | 277 | if [ $DEBUG -eq 1 ]; then |
278 | parted $DEVICE print | 278 | parted $DEVICE print |
@@ -291,34 +291,34 @@ unmount_device || die "Failed to unmount $DEVICE partitions" | |||
291 | info "Formating partitions" | 291 | info "Formating partitions" |
292 | debug "Formatting $BOOTFS as vfat" | 292 | debug "Formatting $BOOTFS as vfat" |
293 | if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then | 293 | if [ ! "${DEVICE#/dev/loop}" = "${DEVICE}" ]; then |
294 | mkfs.vfat -I $BOOTFS -n "EFI" >$OUT 2>1 || die "Failed to format $BOOTFS" | 294 | mkfs.vfat -I $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS" |
295 | else | 295 | else |
296 | mkfs.vfat $BOOTFS -n "EFI" >$OUT 2>1 || die "Failed to format $BOOTFS" | 296 | mkfs.vfat $BOOTFS -n "EFI" >$OUT 2>&1 || die "Failed to format $BOOTFS" |
297 | fi | 297 | fi |
298 | 298 | ||
299 | debug "Formatting $ROOTFS as ext3" | 299 | debug "Formatting $ROOTFS as ext3" |
300 | mkfs.ext3 -F $ROOTFS -L "ROOT" >$OUT 2>1 || die "Failed to format $ROOTFS" | 300 | mkfs.ext3 -F $ROOTFS -L "ROOT" >$OUT 2>&1 || die "Failed to format $ROOTFS" |
301 | 301 | ||
302 | debug "Formatting swap partition ($SWAP)" | 302 | debug "Formatting swap partition ($SWAP)" |
303 | mkswap $SWAP >$OUT 2>1 || die "Failed to prepare swap" | 303 | mkswap $SWAP >$OUT 2>&1 || die "Failed to prepare swap" |
304 | 304 | ||
305 | 305 | ||
306 | # | 306 | # |
307 | # Installing to $DEVICE | 307 | # Installing to $DEVICE |
308 | # | 308 | # |
309 | debug "Mounting images and device in preparation for installation" | 309 | debug "Mounting images and device in preparation for installation" |
310 | mount -o loop $HDDIMG $HDDIMG_MNT >$OUT 2>1 || error "Failed to mount $HDDIMG" | 310 | mount -o loop $HDDIMG $HDDIMG_MNT >$OUT 2>&1 || error "Failed to mount $HDDIMG" |
311 | mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>1 || error "Failed to mount rootfs.img" | 311 | mount -o loop $HDDIMG_MNT/rootfs.img $HDDIMG_ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount rootfs.img" |
312 | mount $ROOTFS $ROOTFS_MNT >$OUT 2>1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT" | 312 | mount $ROOTFS $ROOTFS_MNT >$OUT 2>&1 || error "Failed to mount $ROOTFS on $ROOTFS_MNT" |
313 | mount $BOOTFS $BOOTFS_MNT >$OUT 2>1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT" | 313 | mount $BOOTFS $BOOTFS_MNT >$OUT 2>&1 || error "Failed to mount $BOOTFS on $BOOTFS_MNT" |
314 | 314 | ||
315 | info "Preparing boot partition" | 315 | info "Preparing boot partition" |
316 | EFIDIR="$BOOTFS_MNT/EFI/BOOT" | 316 | EFIDIR="$BOOTFS_MNT/EFI/BOOT" |
317 | cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT >$OUT 2>1 || error "Failed to copy vmlinuz" | 317 | cp $HDDIMG_MNT/vmlinuz $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy vmlinuz" |
318 | # Copy the efi loader and configs (booti*.efi and grub.cfg if it exists) | 318 | # Copy the efi loader and configs (booti*.efi and grub.cfg if it exists) |
319 | cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>1 || error "Failed to copy EFI dir" | 319 | cp -r $HDDIMG_MNT/EFI $BOOTFS_MNT >$OUT 2>&1 || error "Failed to copy EFI dir" |
320 | # Silently ignore a missing gummiboot loader dir (we might just be a GRUB image) | 320 | # Silently ignore a missing gummiboot loader dir (we might just be a GRUB image) |
321 | cp -r $HDDIMG_MNT/loader $BOOTFS_MNT >$OUT 2>1 | 321 | cp -r $HDDIMG_MNT/loader $BOOTFS_MNT >$OUT 2>&1 |
322 | 322 | ||
323 | # Update the boot loaders configurations for an installed image | 323 | # Update the boot loaders configurations for an installed image |
324 | # Remove any existing root= kernel parameters and: | 324 | # Remove any existing root= kernel parameters and: |
@@ -349,7 +349,7 @@ GUMMI_CFG="$GUMMI_ENTRIES/boot.conf" | |||
349 | if [ -d "$GUMMI_ENTRIES" ]; then | 349 | if [ -d "$GUMMI_ENTRIES" ]; then |
350 | info "Configuring Gummiboot" | 350 | info "Configuring Gummiboot" |
351 | # remove the install target if it exists | 351 | # remove the install target if it exists |
352 | rm $GUMMI_ENTRIES/install.conf >$OUT 2>1 | 352 | rm $GUMMI_ENTRIES/install.conf >$OUT 2>&1 |
353 | 353 | ||
354 | if [ ! -e "$GUMMI_CFG" ]; then | 354 | if [ ! -e "$GUMMI_CFG" ]; then |
355 | echo "ERROR: $GUMMI_CFG not found" | 355 | echo "ERROR: $GUMMI_CFG not found" |
@@ -367,7 +367,7 @@ fi | |||
367 | 367 | ||
368 | 368 | ||
369 | info "Copying ROOTFS files (this may take a while)" | 369 | info "Copying ROOTFS files (this may take a while)" |
370 | cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT >$OUT 2>1 || die "Root FS copy failed" | 370 | cp -a $HDDIMG_ROOTFS_MNT/* $ROOTFS_MNT >$OUT 2>&1 || die "Root FS copy failed" |
371 | 371 | ||
372 | echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab | 372 | echo "$TARGET_SWAP swap swap defaults 0 0" >> $ROOTFS_MNT/etc/fstab |
373 | 373 | ||