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 > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 10-29-2009, 02:58 PM
Chris Lumens
 
Default Trim the inital / off the mountpoint before making an LV name from it.

This prevents LVs from being named things like "lv__home".
---
storage/__init__.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 382411a..f369bf3 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -799,7 +799,11 @@ class Storage(object):
if mountpoint == '/':
lvtemplate = 'lv_root'
else:
- template = "lv_%s" % (mountpoint,)
+ if mountpoint.startswith("/"):
+ template = "lv_%s" % mountpoint[1:]
+ else:
+ template = "lv_%s" % (mountpoint,)
+
lvtemplate = safeLvmName(template)
else:
if swap:
--
1.6.5.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 05:42 AM.

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