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 General Discussion

 
 
LinkBack Thread Tools
 
Old 07-12-2010, 02:26 AM
Dave Reisner
 
Default mkinitcpio: mount real root device instead of symlink

If a symlink such as /dev/disk/by-uuid/xxxxx is provided on the kernel cmdline,
resolve it and mount that device instead of the symlink. This prevents some
ugliness in the output of commands such as mount or df.

Signed-off-by: Dave Reisner <d@falconindy.com>
---
init_functions | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/init_functions b/init_functions
index 1ae844b..37b9ebb 100644
--- a/init_functions
+++ b/init_functions
@@ -93,5 +93,8 @@ default_mount_handler() {
else
rwopt="ro"
fi
+ if [ -L "${root}" ]; then
+ root=$(readlink -f "${root}")
+ fi
mount ${fstype:+-t ${fstype}} -o ${rwopt}${rootflags:+,${rootflags}} "${root}" "$1"
}
--
1.7.1.1
 

Thread Tools




All times are GMT. The time now is 01:40 PM.

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