/[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.16 Revision 1.17
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 Gentoo Foundation
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.16 2009/02/27 01:53:34 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/mount-boot.eclass,v 1.17 2009/10/09 20:57:08 vapier Exp $
4# 4#
5# This eclass is really only useful for bootloaders. 5# This eclass is really only useful for bootloaders.
6# 6#
7# If the live system has a separate /boot partition configured, then this 7# If the live system has a separate /boot partition configured, then this
8# function tries to ensure that it's mounted in rw mode, exiting with an 8# function tries to ensure that it's mounted in rw mode, exiting with an
9# error if it cant. It does nothing if /boot isn't a separate partition. 9# error if it cant. It does nothing if /boot isn't a separate partition.
10# 10#
11# MAINTAINER: base-system@gentoo.org 11# MAINTAINER: base-system@gentoo.org
12 12
13EXPORT_FUNCTIONS pkg_preinst 13EXPORT_FUNCTIONS pkg_preinst pkg_prerm
14 14
15mount-boot_mount_boot_partition() { 15mount-boot_mount_boot_partition() {
16 if [[ -n ${DONT_MOUNT_BOOT} ]] ; then 16 if [[ -n ${DONT_MOUNT_BOOT} ]] ; then
17 return 17 return
18 else 18 else
19 elog 19 elog
20 elog "To avoid automounting and autoinstalling with /boot," 20 elog "To avoid automounting and auto(un)installing with /boot,"
21 elog "just export the DONT_MOUNT_BOOT variable." 21 elog "just export the DONT_MOUNT_BOOT variable."
22 elog 22 elog
23 fi 23 fi
24 24
25 # note that /dev/BOOT is in the Gentoo default /etc/fstab file 25 # note that /dev/BOOT is in the Gentoo default /etc/fstab file
70} 70}
71 71
72mount-boot_pkg_preinst() { 72mount-boot_pkg_preinst() {
73 mount-boot_mount_boot_partition 73 mount-boot_mount_boot_partition
74} 74}
75
76mount-boot_pkg_prerm() {
77 touch "${ROOT}"/boot/.keep 2>/dev/null
78 mount-boot_mount_boot_partition
79 touch "${ROOT}"/boot/.keep 2>/dev/null
80}

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.20