summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGregor <dan.mcgregor@usask.ca>2018-05-09 13:37:09 -0600
committerDan McGregor <dan.mcgregor@usask.ca>2018-05-11 09:48:00 -0600
commit166e40a4790cc977aa5136bf3f2c98bd34b7871d (patch)
tree344dacfb6a8df12702ae2c7a2531960692bee83e
parent28b5ee379708c36bd66a442b1b515bb32a729fc0 (diff)
downloadopenembedded-core-contrib-166e40a4790cc977aa5136bf3f2c98bd34b7871d.tar.gz
openembedded-core-contrib-166e40a4790cc977aa5136bf3f2c98bd34b7871d.tar.bz2
openembedded-core-contrib-166e40a4790cc977aa5136bf3f2c98bd34b7871d.zip
base-files: use /proc/self/mounts for /etc/mtab
It should be /proc/self/mounts instead of /proc/mounts. Also switch to using a relative link in base-files, as seems to be the convention in other distributions. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh4
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-testfs.sh2
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh4
-rwxr-xr-xmeta/recipes-core/initscripts/initscripts-1.0/checkroot.sh2
6 files changed, 8 insertions, 8 deletions
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index a6963ba24d..a4c22c51c7 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -132,7 +132,7 @@ do_install () {
install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
- ln -sf /proc/mounts ${D}${sysconfdir}/mtab
+ ln -sf ${@oe.path.relative('${sysconfdir}', '/proc/self/mounts')} ${D}${sysconfdir}/mtab
}
DISTRO_VERSION[vardepsexclude] += "DATE"
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
index 9c4b263d54..60c290e105 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
@@ -67,7 +67,7 @@ rm -f /etc/udev/scripts/mount*
umount /dev/${device}* 2> /dev/null || /bin/true
mkdir -p /tmp
-cat /proc/mounts > /etc/mtab
+cat /proc/self/mounts > /etc/mtab
disk_size=$(parted /dev/${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 82b0aa819e..838bc83fdb 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -141,8 +141,8 @@ umount ${device}* 2> /dev/null || /bin/true
mkdir -p /tmp
# Create /etc/mtab if not present
-if [ ! -e /etc/mtab ] && [ -e /proc/mounts ]; then
- ln -sf /proc/mounts /etc/mtab
+if [ ! -e /etc/mtab ] && [ -e /proc/self/mounts ]; then
+ ln -sf /proc/self/mounts /etc/mtab
fi
disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
diff --git a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
index ac62160528..c5b435286e 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
@@ -91,7 +91,7 @@ fi
mkdir -p /tmp
if [ ! -L /etc/mtab ]; then
- cat /proc/mounts > /etc/mtab
+ cat /proc/self/mounts > /etc/mtab
fi
disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 28e8f09d19..e203caa32f 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -137,8 +137,8 @@ if [ ! -b /dev/loop0 ] ; then
fi
mkdir -p /tmp
-if [ ! -L /etc/mtab ] && [ -e /proc/mounts ]; then
- ln -sf /proc/mounts /etc/mtab
+if [ ! -L /etc/mtab ] && [ -e /proc/self/mounts ]; then
+ ln -sf /proc/self/mounts /etc/mtab
fi
disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh b/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh
index 02f0351fcb..db472ac267 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/checkroot.sh
@@ -142,7 +142,7 @@ fi
mount -n -o remount,$rootmode /
if test "$rootmode" = rw
then
- ln -sf /proc/mounts /dev/mtab
+ ln -sf /proc/self/mounts /dev/mtab
fi
: exit 0