sys-apps/baselayout: 2.4.1-r2: fix tmpfs warning
authorWilliam Hubbs <williamh@gentoo.org>
Tue, 3 Oct 2017 17:35:54 +0000 (12:35 -0500)
committerWilliam Hubbs <williamh@gentoo.org>
Tue, 3 Oct 2017 17:36:26 +0000 (12:36 -0500)
bug: https://bugs.gentoo.org/show_bug.cgi?id=633360
Package-Manager: Portage-2.3.8, Repoman-2.3.3

sys-apps/baselayout/baselayout-2.4.1-r2.ebuild

index 0d17f0e8894a06d482db8ca1f76d61135894b055..2d2293456f956b68e90731654fb9c99f2ef3e84f 100644 (file)
@@ -224,10 +224,12 @@ pkg_postinst() {
        if use kernel_linux; then
                mkdir -p "${EROOT}"run
 
-               if ! grep -qs "^tmpfs.*/run " "${ROOT}"proc/mounts ; then
-                       echo
-                       ewarn "You should reboot the system now to get /run mounted with tmpfs!"
-               fi
+               local found
+               while read -r _ mountpoint fstype _; do
+               [[ ${mountpoint} = /run ]] && [[ ${fstype} = tmpfs ]] && found=1
+               done < "${ROOT}"proc/mounts
+               [[ -z ${found} ]] &&
+                       ewarn "You should reboot now to get /run mounted with tmpfs!"
        fi
 
        for x in ${REPLACING_VERSIONS}; do