[PATCH 1/5] Trim the inital / off the mountpoint before making an LV name from it.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux