From: "Mike Frysinger (vapier)" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] gentoo-x86 commit in eclass: mount-boot.eclass
Date: Thu, 30 Jul 2015 07:00:40 +0000 (UTC) [thread overview]
Message-ID: <20150730070040.6C580115@oystercatcher.gentoo.org> (raw)
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
next reply other threads:[~2015-07-30 7:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 7:00 Mike Frysinger (vapier) [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-07-30 7:16 [gentoo-commits] gentoo-x86 commit in eclass: mount-boot.eclass Mike Frysinger (vapier)
2015-07-30 7:14 Mike Frysinger (vapier)
2015-07-30 7:03 Mike Frysinger (vapier)
2015-07-30 6:53 Mike Frysinger (vapier)
2011-01-09 3:18 Mike Frysinger (vapier)
2009-10-09 20:57 Mike Frysinger (vapier)
2009-02-27 1:53 Mike Frysinger (vapier)
2008-11-27 18:36 Mike Frysinger (vapier)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150730070040.6C580115@oystercatcher.gentoo.org \
--to=vapier@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox