On 04/09/2009 12:21 PM, Jacek Danecki wrote:
Hans de Goede wrote:
I still don't get this one, you wrote in response
to my previous question:
name=/dev/md/imsm0
self.path=/dev/imsm
Mdadm 3.0 allows to create files with specific name in /dev/md not in
/dev
First of all I assume that both lines should have imsm0 ?
Yes, my mistake, I'm sorry. self.path is set to /dev/imsm0
and this name for container is incorrect, so I'm changing it to
/dev/md/imsm0
I think I'll rewrite this patch because I can set correct name of
container in devicetree.py
before calling MDRaidArrayDevice.__init__()
Also not that:
"/dev/imsm".split("/")[2]
Will not get you "imsm" but an array out
of bounds exception. What you want then is:
"/dev/imsm".split("/")[1]
Hmm, I can see something different in the script below
path="/dev/imsm0"
print "1:", path.split("/")[1]
print "2:", path.split("/")[2]
print "/dev/imsm0".split("/")[2]
It gives me:
1: dev
2: imsm0
imsm0
Ah python's split returns an empty string as index 0 for
the part before the first / I didn't expect that, you are
right.
Regards,
Hans
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list