From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 09/10] init-install: code cleanup: Replace tabs with spaces
Date: Mon, 15 Jun 2015 19:10:46 +0300 [thread overview]
Message-ID: <1434384647-2901-10-git-send-email-ed.bartosh@linux.intel.com> (raw)
In-Reply-To: <1434384647-2901-1-git-send-email-ed.bartosh@linux.intel.com>
Cleaned up spaces from init-install* shell scripts.
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index a6a8679..dca1432 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -24,22 +24,22 @@ echo "Searching for hard drives ..."
for device in `ls /sys/block/`; do
case $device in
- loop*)
+ loop*)
# skip loop device
- ;;
- sr*)
+ ;;
+ sr*)
# skip CDROM device
- ;;
- ram*)
+ ;;
+ ram*)
# skip ram device
- ;;
- *)
- # skip the device LiveOS is on
- # Add valid hard drive name to the list
- if [ $device != $live_dev_name -a -e /dev/$device ]; then
- hdnamelist="$hdnamelist $device"
- fi
- ;;
+ ;;
+ *)
+ # skip the device LiveOS is on
+ # Add valid hard drive name to the list
+ if [ $device != $live_dev_name -a -e /dev/$device ]; then
+ hdnamelist="$hdnamelist $device"
+ fi
+ ;;
esac
done
@@ -49,8 +49,8 @@ for hdname in $hdnamelist; do
echo "-------------------------------"
echo /dev/$hdname
if [ -r /sys/block/$hdname/device/vendor ]; then
- echo -n "VENDOR="
- cat /sys/block/$hdname/device/vendor
+ echo -n "VENDOR="
+ cat /sys/block/$hdname/device/vendor
fi
if [ -r /sys/block/$hdname/device/model ]; then
echo -n "MODEL="
@@ -63,18 +63,17 @@ for hdname in $hdnamelist; do
echo
# Get user choice
while true; do
- echo -n "Do you want to install this image there? [y/n] "
- read answer
- if [ "$answer" = "y" -o "$answer" = "n" ]; then
- break
- fi
- echo "Please answer y or n"
+ echo -n "Do you want to install this image there? [y/n] "
+ read answer
+ if [ "$answer" = "y" -o "$answer" = "n" ]; then
+ break
+ fi
+ echo "Please answer y or n"
done
if [ "$answer" = "y" ]; then
- TARGET_DEVICE_NAME=$hdname
- break
+ TARGET_DEVICE_NAME=$hdname
+ break
fi
-
done
if [ -n "$TARGET_DEVICE_NAME" ]; then
@@ -170,7 +169,7 @@ if [ -d /tgt_root/etc/ ] ; then
echo "UUID=$boot_uuid /boot vfat defaults 1 2" >> /tgt_root/etc/fstab
# We dont want udev to mount our root device while we're booting...
if [ -d /tgt_root/etc/udev/ ] ; then
- echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist
+ echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist
fi
fi
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 2c5d530..df2babd 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -23,22 +23,22 @@ echo "Searching for hard drives ..."
for device in `ls /sys/block/`; do
case $device in
- loop*)
+ loop*)
# skip loop device
- ;;
- sr*)
+ ;;
+ sr*)
# skip CDROM device
- ;;
- ram*)
+ ;;
+ ram*)
# skip ram device
- ;;
- *)
- # skip the device LiveOS is on
- # Add valid hard drive name to the list
- if [ $device != $live_dev_name -a -e /dev/$device ]; then
- hdnamelist="$hdnamelist $device"
- fi
- ;;
+ ;;
+ *)
+ # skip the device LiveOS is on
+ # Add valid hard drive name to the list
+ if [ $device != $live_dev_name -a -e /dev/$device ]; then
+ hdnamelist="$hdnamelist $device"
+ fi
+ ;;
esac
done
@@ -48,8 +48,8 @@ for hdname in $hdnamelist; do
echo "-------------------------------"
echo /dev/$hdname
if [ -r /sys/block/$hdname/device/vendor ]; then
- echo -n "VENDOR="
- cat /sys/block/$hdname/device/vendor
+ echo -n "VENDOR="
+ cat /sys/block/$hdname/device/vendor
fi
if [ -r /sys/block/$hdname/device/model ]; then
echo -n "MODEL="
@@ -62,16 +62,16 @@ for hdname in $hdnamelist; do
echo
# Get user choice
while true; do
- echo -n "Do you want to install this image there? [y/n] "
- read answer
- if [ "$answer" = "y" -o "$answer" = "n" ]; then
- break
- fi
- echo "Please answer y or n"
+ echo -n "Do you want to install this image there? [y/n] "
+ read answer
+ if [ "$answer" = "y" -o "$answer" = "n" ]; then
+ break
+ fi
+ echo "Please answer y or n"
done
if [ "$answer" = "y" ]; then
- TARGET_DEVICE_NAME=$hdname
- break
+ TARGET_DEVICE_NAME=$hdname
+ break
fi
done
@@ -101,7 +101,7 @@ fi
mkdir -p /tmp
if [ ! -L /etc/mtab ]; then
- cat /proc/mounts > /etc/mtab
+ cat /proc/mounts > /etc/mtab
fi
disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
@@ -130,8 +130,8 @@ swap_start=$((rootfs_end))
rootwait=""
part_prefix=""
if [ ! "${device#mmcblk}" = "${device}" ]; then
- part_prefix="p"
- rootwait="rootwait"
+ part_prefix="p"
+ rootwait="rootwait"
fi
if [ $grub_version -eq 0 ] ; then
@@ -204,7 +204,7 @@ if [ -d /tgt_root/etc/ -a $grub_version -ne 0 ] ; then
echo "UUID=$boot_uuid /boot ext3 defaults 1 2" >> /tgt_root/etc/fstab
# We dont want udev to mount our root device while we're booting...
if [ -d /tgt_root/etc/udev/ ] ; then
- echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist
+ echo "/dev/${device}" >> /tgt_root/etc/udev/mount.blacklist
fi
fi
umount /tgt_root
--
2.1.4
next prev parent reply other threads:[~2015-06-15 18:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 16:10 [PATCH 00/10] UUID support in installer (poky-contrib: ed/oe-core/uuid-init-install) Ed Bartosh
2015-06-15 16:10 ` [PATCH 01/10] image-live: Set syslinux timeout to 5s Ed Bartosh
2015-06-15 16:10 ` [PATCH 02/10] initramfs-live-install: Add blkid to initramfs Ed Bartosh
2015-06-15 16:10 ` [PATCH 03/10] busybox: Enable UUID-related options Ed Bartosh
2015-06-15 16:10 ` [PATCH 04/10] init-install-efi: Implement UUID support Ed Bartosh
2015-06-15 16:10 ` [PATCH 05/10] init-install: Use GPT table with GRUB 2 Ed Bartosh
2015-06-15 16:10 ` [PATCH 06/10] init-install: Implement UUID support Ed Bartosh
2015-06-15 16:10 ` [PATCH 07/10] init-install: Specify filesystem type in parted command line Ed Bartosh
2015-06-15 16:10 ` [PATCH 08/10] init-install: Specify partition name " Ed Bartosh
2015-06-15 16:10 ` Ed Bartosh [this message]
2015-06-15 16:10 ` [PATCH 10/10] init-install: code cleanup: replace /dev/$device -> $device Ed Bartosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434384647-2901-10-git-send-email-ed.bartosh@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox