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
|