vapier      15/07/30 07:00:40

  Modified:             mount-boot.eclass
  Log:
  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)

Revision  Changes    Path
1.20                 eclass/mount-boot.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mount-boot.eclass?rev=1.20&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mount-boot.eclass?rev=1.20&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/mount-boot.eclass?r1=1.19&r2=1.20

Index: mount-boot.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/mount-boot.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- mount-boot.eclass   30 Jul 2015 06:53:02 -0000      1.19
+++ mount-boot.eclass   30 Jul 2015 07:00:40 -0000      1.20
@@ -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 @@
        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 @@
 
        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 @@
        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




Reply via email to