/[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.5 Revision 1.6
1# Copyright 1999-2002 Gentoo Technologies, Inc. 1# Copyright 1999-2002 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.5 2002/10/25 19:55:52 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mount-boot.eclass,v 1.6 2002/11/13 04:59:31 woodchip Exp $
4 4
5ECLASS=mount-boot 5ECLASS=mount-boot
6INHERITED="$INHERITED $ECLASS" 6INHERITED="$INHERITED $ECLASS"
7 7
8mount-boot_pkg_setup(){ 8mount-boot_pkg_setup(){
9 9
10[ "${ROOT}" != "/" ] && return 0 10[ "${ROOT}" != "/" ] && return 0
11 11
12 local fstabstate="$(cat /etc/fstab | awk '!/^#|^[[:blank:]]+#|^\/dev\/BOOT/ {print $2}' | egrep "/boot" )" 12 local fstabstate="$(cat /etc/fstab | awk '!/^#|^[[:blank:]]+#|^\/dev\/BOOT/ {print $2}' | egrep "^/boot$" )"
13 local procstate="$(cat /proc/mounts | awk '{print $2}' | egrep "/boot" )" 13 local procstate="$(cat /proc/mounts | awk '{print $2}' | egrep "^/boot$" )"
14 local proc_ro="$(cat /proc/mounts | awk '{ print $2, $4 }' | sed -n '/\/boot/{ /[ ,]\?ro[ ,]\?/p }' )" 14 local proc_ro="$(cat /proc/mounts | awk '{ print $2, $4 }' | sed -n '/\/boot/{ /[ ,]\?ro[ ,]\?/p }' )"
15 15
16 if [ -n "${fstabstate}" ] && [ -n "${procstate}" ]; then 16 if [ -n "${fstabstate}" ] && [ -n "${procstate}" ]; then
17 if [ -n "${proc_ro}" ]; then 17 if [ -n "${proc_ro}" ]; then
18 echo 18 echo

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20