summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2002-09-30 00:56:44 +0000
committerDonny Davies <woodchip@gentoo.org>2002-09-30 00:56:44 +0000
commit053028970cba555cc05b1d2ee43ae05d243c172e (patch)
treee1b5e75e9cc0b85fc0b075711c64a8545c316407 /eclass/mount-boot.eclass
parentclose #7898, #8057, #7903 (diff)
downloadgentoo-2-053028970cba555cc05b1d2ee43ae05d243c172e.tar.gz
gentoo-2-053028970cba555cc05b1d2ee43ae05d243c172e.tar.bz2
gentoo-2-053028970cba555cc05b1d2ee43ae05d243c172e.zip
fixes from #7903
Diffstat (limited to 'eclass/mount-boot.eclass')
-rw-r--r--eclass/mount-boot.eclass25
1 files changed, 14 insertions, 11 deletions
diff --git a/eclass/mount-boot.eclass b/eclass/mount-boot.eclass
index efd24bfddb79..78c65d0ba9fe 100644
--- a/eclass/mount-boot.eclass
+++ b/eclass/mount-boot.eclass
@@ -1,6 +1,6 @@
-# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/eclass/mount-boot.eclass,v 1.2 2002/09/22 21:02:08 woodchip Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/mount-boot.eclass,v 1.3 2002/09/30 00:56:44 woodchip Exp $
ECLASS=mount-boot
INHERITED="$INHERITED $ECLASS"
@@ -11,37 +11,40 @@ mount-boot_pkg_setup(){
local fstabstate="$(cat /etc/fstab | awk '!/^#|^[[:blank:]]+#/ {print $2}' | egrep "/boot" )"
local procstate="$(cat /proc/mounts | awk '{print $2}' | egrep "/boot" )"
+ local proc_ro="$(cat /proc/mounts | awk '{ print $2, $4 }' | sed -n '/\/boot/{ /[ ,]\?ro[ ,]\?/p }' )"
if [ -n "${fstabstate}" ] && [ -n "${procstate}" ]; then
- if [ -n "`cat /proc/mounts | awk '{ print $2, $4 }' | sed -n '/\/boot/{ /[ ,]ro/p }'`" ]; then
+ if [ -n "${proc_ro}" ]; then
+ echo
einfo "Your boot partition, detected as being mounted as /boot, is read-only"
einfo "Remounting it in read-write mode"
- sleep 1; echo -ne "\a"; sleep 1; echo -ne "\a"
+ sleep 1; echo -ne "\a"; sleep 1; echo -e "\a"
mount -o remount,rw /boot &>/dev/null
if [ "$?" -ne 0 ]; then
eerror; eerror "Unable to remount in rw mode. Please do it manually" ; eerror
- sleep 1; echo -ne "\a"; sleep 1; echo -ne "\a"
+ sleep 1; echo -ne "\a"; sleep 1; echo -e "\a"
die "Can't remount in rw mode. Please do it manually"
fi
else
echo
einfo "Your boot partition was detected as being mounted as /boot."
einfo "Files will be installed there for ${PN} to function correctly."
- sleep 1; echo -ne "\a"; sleep 1; echo -ne "\a"
+ sleep 1; echo -ne "\a"; sleep 1; echo -e "\a"
fi
elif [ -n "${fstabstate}" ] && [ -z "${procstate}" ]; then
- mount /boot &>/dev/null
+ mount /boot -o rw &>/dev/null
if [ "$?" -eq 0 ]; then
echo
- einfo "Your boot partition was not mounted as /boot, but portage was able to mount"
- einfo "it without additional intervention."
+ 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."
- sleep 1; echo -ne "\a"; sleep 1; echo -ne "\a"
+ sleep 1; echo -ne "\a"; sleep 1; echo -e "\a"
else
echo
+ eerror "Cannot mount automatically your boot partition."
eerror "Your boot partition has to be mounted on /boot before the installation"
eerror "can continue. ${PN} needs to install important files there."
- sleep 1; echo -ne "\a"; sleep 1; echo -ne "\a"
+ sleep 1; echo -ne "\a"; sleep 1; echo -e "\a"
die "Please mount your /boot partition."
fi
else