diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-08-24 14:34:26 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-08-24 14:36:41 +0200 |
commit | fcbcf021f60f4b37927e6f6b433bc7ac57e0a72f (patch) | |
tree | a0fc28d766d1acfd74b46a2357520aeb5ce0b9c3 /sys-fs | |
parent | sys-kernel/genkernel: try to detect and warn for problematic /run permissions (diff) | |
download | gentoo-fcbcf021f60f4b37927e6f6b433bc7ac57e0a72f.tar.gz gentoo-fcbcf021f60f4b37927e6f6b433bc7ac57e0a72f.tar.bz2 gentoo-fcbcf021f60f4b37927e6f6b433bc7ac57e0a72f.zip |
sys-fs/lvm2: try to detect and warn for problematic /run permissions
Bug: https://bugs.gentoo.org/737270
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/lvm2/lvm2-2.02.187-r2.ebuild | 16 | ||||
-rw-r--r-- | sys-fs/lvm2/lvm2-2.03.10.ebuild | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/sys-fs/lvm2/lvm2-2.02.187-r2.ebuild b/sys-fs/lvm2/lvm2-2.02.187-r2.ebuild index 8c994897df92..3111a305fc4f 100644 --- a/sys-fs/lvm2/lvm2-2.02.187-r2.ebuild +++ b/sys-fs/lvm2/lvm2-2.02.187-r2.ebuild @@ -271,6 +271,22 @@ pkg_postinst() { ewarn ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want" ewarn "to enable lvm autoactivation and metadata caching." + + if use udev && [[ -d /run ]] ; then + local permission_run_expected="drwxr-xr-x" + local permission_run=$(stat -c "%A" /run) + if [[ "${permission_run}" != "${permission_run_expected}" ]] ; then + ewarn "Found the following problematic permissions:" + ewarn "" + ewarn " ${permission_run} /run" + ewarn "" + ewarn "Expected:" + ewarn "" + ewarn " ${permission_run_expected} /run" + ewarn "" + ewarn "This is known to be causing problems for UDEV-enabled LVM services." + fi + fi } src_test() { diff --git a/sys-fs/lvm2/lvm2-2.03.10.ebuild b/sys-fs/lvm2/lvm2-2.03.10.ebuild index 40418f6bae35..66bf4be80bc6 100644 --- a/sys-fs/lvm2/lvm2-2.03.10.ebuild +++ b/sys-fs/lvm2/lvm2-2.03.10.ebuild @@ -255,6 +255,22 @@ src_install() { pkg_postinst() { ewarn "Make sure the \"lvm\" init script is in the runlevels:" ewarn "# rc-update add lvm boot" + + if use udev && [[ -d /run ]] ; then + local permission_run_expected="drwxr-xr-x" + local permission_run=$(stat -c "%A" /run) + if [[ "${permission_run}" != "${permission_run_expected}" ]] ; then + ewarn "Found the following problematic permissions:" + ewarn "" + ewarn " ${permission_run} /run" + ewarn "" + ewarn "Expected:" + ewarn "" + ewarn " ${permission_run_expected} /run" + ewarn "" + ewarn "This is known to be causing problems for UDEV-enabled LVM services." + fi + fi } src_test() { |