aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew Moseley <drew@moseleynet.net>2016-08-04 09:57:19 -0400
committerGitHub <noreply@github.com>2016-08-04 09:57:19 -0400
commitd4d42e463d847ea7de155bf261e489918a91df0e (patch)
tree699c836e1da8916a0dd0be64685acc0024d1f01b
parentdb6786431fb7c30b78f022b052b85df6abf58c54 (diff)
parent78526e5a33665d5e6a3a745da3c2c27a965f89e4 (diff)
downloadmeta-amd-d4d42e463d847ea7de155bf261e489918a91df0e.tar.gz
meta-amd-d4d42e463d847ea7de155bf261e489918a91df0e.tar.bz2
meta-amd-d4d42e463d847ea7de155bf261e489918a91df0e.zip
Merge pull request #327 from abelal/fix_install
init-install*: /etc/mtab make a link rather than a copy
-rw-r--r--common/recipes-core/initrdscripts/files/0009-init-install.sh-etc-mtab-make-a-softlink-rather-than.patch35
-rw-r--r--common/recipes-core/initrdscripts/files/0010-init-install-efi.sh-etc-mtab-make-a-softlink-rather-.patch36
-rw-r--r--common/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bbappend1
-rw-r--r--common/recipes-core/initrdscripts/initramfs-live-install_1.0.bbappend1
4 files changed, 73 insertions, 0 deletions
diff --git a/common/recipes-core/initrdscripts/files/0009-init-install.sh-etc-mtab-make-a-softlink-rather-than.patch b/common/recipes-core/initrdscripts/files/0009-init-install.sh-etc-mtab-make-a-softlink-rather-than.patch
new file mode 100644
index 00000000..1ec0f222
--- /dev/null
+++ b/common/recipes-core/initrdscripts/files/0009-init-install.sh-etc-mtab-make-a-softlink-rather-than.patch
@@ -0,0 +1,35 @@
+From 8ae71c99ce763f9ce49afe25f5569931dfd6cd1e Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_belal@mentor.com>
+Date: Thu, 28 Jul 2016 13:24:52 +0500
+Subject: [PATCH] init-install.sh: /etc/mtab make a softlink rather than a copy
+
+Using a copy would only make management of devices erroneous
+and makes the system unstable in some scenarios as tools will
+have to manipulate both files separately. A link ensures that
+both files /proc/mounts and /etc/mtab will have the same
+information at all times and this is how it is handled
+on newer systems where there is such a need.
+
+Signed-off-by: Awais Belal <awais_belal@mentor.com>
+---
+ init-install.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git init-install.sh init-install.sh
+index 1b69b71..5b8f925 100644
+--- init-install.sh
++++ init-install.sh
+@@ -122,8 +122,8 @@ if [ ! -b /dev/loop0 ] ; then
+ fi
+
+ mkdir -p /tmp
+-if [ ! -L /etc/mtab ]; then
+- cat /proc/mounts > /etc/mtab
++if [ ! -L /etc/mtab ] && [ -e /proc/mounts ]; then
++ ln -sf /proc/mounts /etc/mtab
+ fi
+
+ disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
+--
+1.9.1
+
diff --git a/common/recipes-core/initrdscripts/files/0010-init-install-efi.sh-etc-mtab-make-a-softlink-rather-.patch b/common/recipes-core/initrdscripts/files/0010-init-install-efi.sh-etc-mtab-make-a-softlink-rather-.patch
new file mode 100644
index 00000000..053ef092
--- /dev/null
+++ b/common/recipes-core/initrdscripts/files/0010-init-install-efi.sh-etc-mtab-make-a-softlink-rather-.patch
@@ -0,0 +1,36 @@
+From 172e6d8c4e5cb8746b87130bbd6d38a60248b343 Mon Sep 17 00:00:00 2001
+From: Awais Belal <awais_belal@mentor.com>
+Date: Thu, 28 Jul 2016 13:35:01 +0500
+Subject: [PATCH] init-install-efi.sh: /etc/mtab make a softlink rather than a
+ copy
+
+Using a copy would only make management of devices erroneous
+and makes the system unstable in some scenarios as tools will
+have to manipulate both files separately. A link ensures that
+both files /proc/mounts and /etc/mtab will have the same
+information at all times and this is how it is handled
+on newer systems where there is such a need.
+
+Signed-off-by: Awais Belal <awais_belal@mentor.com>
+---
+ init-install-efi.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git init-install-efi.sh init-install-efi.sh
+index a6a9047..39e8806 100644
+--- init-install-efi.sh
++++ init-install-efi.sh
+@@ -126,8 +126,8 @@ umount ${device}* 2> /dev/null || /bin/true
+ mkdir -p /tmp
+
+ # Create /etc/mtab if not present
+-if [ ! -e /etc/mtab ]; then
+- cat /proc/mounts > /etc/mtab
++if [ ! -e /etc/mtab ] && [ -e /proc/mounts ]; then
++ ln -sf /proc/mounts /etc/mtab
+ fi
+
+ disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
+--
+1.9.1
+
diff --git a/common/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bbappend b/common/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bbappend
index 7456f1ea..41efdfea 100644
--- a/common/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bbappend
+++ b/common/recipes-core/initrdscripts/initramfs-live-install-efi_1.0.bbappend
@@ -4,4 +4,5 @@ SRC_URI_append_amd = " \
file://0004-init-install-efi.sh-Add-a-second-prompt-to-install.patch;striplevel=0;patchdir=${WORKDIR} \
file://0005-init-install-efi.sh-correctly-handle-mmc-device-chec.patch;striplevel=0;patchdir=${WORKDIR} \
file://0007-init-install-efi.sh-use-generated-partition-names-fo.patch;striplevel=0;patchdir=${WORKDIR} \
+ file://0010-init-install-efi.sh-etc-mtab-make-a-softlink-rather-.patch;striplevel=0;patchdir=${WORKDIR} \
"
diff --git a/common/recipes-core/initrdscripts/initramfs-live-install_1.0.bbappend b/common/recipes-core/initrdscripts/initramfs-live-install_1.0.bbappend
index 145017c0..bdb939f4 100644
--- a/common/recipes-core/initrdscripts/initramfs-live-install_1.0.bbappend
+++ b/common/recipes-core/initrdscripts/initramfs-live-install_1.0.bbappend
@@ -4,4 +4,5 @@ SRC_URI_append_amd = " \
file://0002-init-install.sh-Add-a-second-prompt-to-install.patch;striplevel=0;patchdir=${WORKDIR} \
file://0006-init-install.sh-correctly-handle-mmc-device-check.patch;striplevel=0;patchdir=${WORKDIR} \
file://0008-init-install.sh-use-generated-partition-names-for-UU.patch;striplevel=0;patchdir=${WORKDIR} \
+ file://0009-init-install.sh-etc-mtab-make-a-softlink-rather-than.patch;striplevel=0;patchdir=${WORKDIR} \
"