/[gentoo-x86]/eclass/mount-boot.eclass
Gentoo

Diff of /eclass/mount-boot.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.7 Revision 1.8
1# Copyright 1999-2002 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/mount-boot.eclass,v 1.7 2003/01/25 01:49:58 woodchip Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mount-boot.eclass,v 1.8 2003/02/16 04:26:21 vapier Exp $
4#
5# If the live system has a separate /boot partition configured, then this
6# function tries to ensure that it's mounted in rw mode, exiting with an
7# error if it cant. It does nothing if /boot isn't a separate partition.
4 8
5ECLASS=mount-boot 9ECLASS=mount-boot
6INHERITED="$INHERITED $ECLASS" 10INHERITED="$INHERITED $ECLASS"
7 11
8EXPORT_FUNCTIONS pkg_preinst 12EXPORT_FUNCTIONS pkg_preinst
9
10# If the live system has a separate /boot partition configured, then this
11# function tries to ensure that it's mounted in rw mode, exiting with an
12# error if it cant. It does nothing if /boot isn't a separate partition.
13 13
14mount-boot_mount_boot_partition(){ 14mount-boot_mount_boot_partition(){
15 # note that /dev/BOOT is in the Gentoo default /etc/fstab file 15 # note that /dev/BOOT is in the Gentoo default /etc/fstab file
16 local fstabstate="$(cat /etc/fstab | awk '!/^#|^[[:blank:]]+#|^\/dev\/BOOT/ {print $2}' | egrep "^/boot$" )" 16 local fstabstate="$(cat /etc/fstab | awk '!/^#|^[[:blank:]]+#|^\/dev\/BOOT/ {print $2}' | egrep "^/boot$" )"
17 local procstate="$(cat /proc/mounts | awk '{print $2}' | egrep "^/boot$" )" 17 local procstate="$(cat /proc/mounts | awk '{print $2}' | egrep "^/boot$" )"

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20