diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-07-30 07:00:40 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-07-30 07:00:40 +0000 |
commit | 674a21bbaeda6341fc2a8620f41c016a20dbe1b8 (patch) | |
tree | dfc47fc9c91ec1946363ce7ff25116177d1fadd4 /eclass | |
parent | add eclass docs (diff) | |
download | historical-674a21bbaeda6341fc2a8620f41c016a20dbe1b8.tar.gz historical-674a21bbaeda6341fc2a8620f41c016a20dbe1b8.tar.bz2 historical-674a21bbaeda6341fc2a8620f41c016a20dbe1b8.zip |
improve the output a bit: do a bit of word smithing, try to make it less spammy with empty lines, and make the mount cases consistent (output message before mounting)
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/mount-boot.eclass | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/eclass/mount-boot.eclass b/eclass/mount-boot.eclass index 82c2ed64b168..b2b7d38093a8 100644 --- a/eclass/mount-boot.eclass +++ b/eclass/mount-boot.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mount-boot.eclass,v 1.19 2015/07/30 06:53:02 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mount-boot.eclass,v 1.20 2015/07/30 07:00:40 vapier Exp $ # @ECLASS: mount-boot.eclass # @MAINTAINER: @@ -19,10 +19,8 @@ mount-boot_mount_boot_partition() { if [[ -n ${DONT_MOUNT_BOOT} ]] ; then return else - elog elog "To avoid automounting and auto(un)installing with /boot," elog "just export the DONT_MOUNT_BOOT variable." - elog fi # note that /dev/BOOT is in the Gentoo default /etc/fstab file @@ -32,45 +30,37 @@ mount-boot_mount_boot_partition() { if [ -n "${fstabstate}" ] && [ -n "${procstate}" ]; then if [ -n "${proc_ro}" ]; then - einfo - einfo "Your boot partition, detected as being mounted as /boot, is read-only." - einfo "Remounting it in read-write mode ..." - einfo + echo + einfo "Your boot partition, detected as being mounted at /boot, is read-only." + einfo "It will be remounted in read-write mode temporarily." mount -o remount,rw /boot if [ "$?" -ne 0 ]; then - eerror + echo eerror "Unable to remount in rw mode. Please do it manually!" - eerror die "Can't remount in rw mode. Please do it manually!" fi touch /boot/.e.remount else - einfo - einfo "Your boot partition was detected as being mounted as /boot." + echo + einfo "Your boot partition was detected as being mounted at /boot." einfo "Files will be installed there for ${PN} to function correctly." - einfo fi elif [ -n "${fstabstate}" ] && [ -z "${procstate}" ]; then + echo + einfo "Your boot partition was not mounted at /boot, so it will be automounted for you." + einfo "Files will be installed there for ${PN} to function correctly." mount /boot -o rw - if [ "$?" -eq 0 ]; then - einfo - einfo "Your boot partition was not mounted as /boot, but portage" - einfo "was able to mount it without additional intervention." - einfo "Files will be installed there for ${PN} to function correctly." - einfo - else - eerror + if [ "$?" -ne 0 ]; then + echo eerror "Cannot automatically mount your /boot partition." eerror "Your boot partition has to be mounted rw before the installation" eerror "can continue. ${PN} needs to install important files there." - eerror die "Please mount your /boot partition manually!" fi touch /boot/.e.mount else - einfo + echo einfo "Assuming you do not have a separate /boot partition." - einfo fi } @@ -90,15 +80,11 @@ mount-boot_umount_boot_partition() { fi if [ -e /boot/.e.remount ] ; then - einfo - einfo "Automatically remounting /boot as ro" - einfo + einfo "Automatically remounting /boot as ro as it was previously." rm -f /boot/.e.remount mount -o remount,ro /boot elif [ -e /boot/.e.mount ] ; then - einfo - einfo "Automatically unmounting /boot" - einfo + einfo "Automatically unmounting /boot as it was previously." rm -f /boot/.e.mount umount /boot fi |