FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 01-12-2012, 10:12 PM
Dave Reisner
 
Default autodetect: try to find /usr partition fstype

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
install/autodetect | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/install/autodetect b/install/autodetect
index abc0fa0..7f40b9c 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -3,6 +3,12 @@
build() {
MODULE_FILE=$workdir/autodetect_modules

+ add_if_avail() {
+ if modinfo -k "$KERNELVERSION" "$1" &>/dev/null; then
+ printf '%s
' "$1" >>"$MODULE_FILE"
+ fi
+ }
+
if [[ ! -d /sys/devices ]]; then
error "/sys does not appear to be mounted. Unable to use autodetection"
return 1
@@ -16,8 +22,11 @@ build() {
fi

# filesystem module might be a builtin
- if modinfo -k "$KERNELVERSION" "$rootfstype" &>/dev/null; then
- printf '%s
' "$rootfstype" >>"$MODULE_FILE"
+ add_if_avail "$rootfstype"
+
+ # detect separate /usr
+ if usrfstype=$(findmnt -nero fstype -s"$BASEDIR/etc/fstab" /usr); then
+ add_if_avail "$usrfstype"
fi

if (( UID == 0 )) || in_array 'disk' $(groups); then
--
1.7.8.3
 

Thread Tools




All times are GMT. The time now is 04:09 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org