# Copyright 1999-2000 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: $ ECLASS=boot INHERITED="$INHERITED $ECLASS" boot_pkg_setup(){ [ "${ROOT}" != "/" ] && return 0 local fstabstate="$(cat /etc/fstab | awk '!/^#|^[[:blank:]]+#/ {print $2}')" local procstate="$(cat /proc/mounts | awk '{print $2}')" local fstabbed="$( echo ${fstabstate} | egrep "/boot" )" local mounted="$( echo ${procstate} | egrep "/boot" )" if [ -n "${fstabbed}" ] && [ -n "${mounted}" ]; then einfo "Your boot partition was detected as being mounted as /boot." einfo "Files will be installed there for ${PN} to function correctly." elif [ -n "${fstabbed}" ] && [ -z "${mounted}" ]; then mount /boot &>/dev/null if [ "$?" -eq 0 ] then einfo "Your boot partition was not mounted as /boot, but portage was able to mount" einfo "it without additional intervention." einfo "Files will be installed there for ${PN} to function correctly." else eerror "Your boot partition has to be mounted on /boot before the installation" eerror "can continue. ${PN} needs to install important files there." die "Please mount your /boot partition." fi else einfo "Assuming you do not have a seperate /boot partition." fi } EXPORT_FUNCTIONS pkg_setup