Permalink
Browse files

Fix initrd support

  • Loading branch information...
1 parent 8420c78 commit 27d9dfb2b10ba79252dc9279f6cdc31eb0cfc247 Ryan Harris committed Jul 19, 2012
Showing with 10 additions and 5 deletions.
  1. +9 −4 python/modules/funtoo/boot/resolver.py
  2. +1 −1 sbin/boot-update
View
13 python/modules/funtoo/boot/resolver.py
@@ -83,11 +83,16 @@ def FindInitrds(self,initrds,kernel,kext):
base_path=os.path.dirname(kernel)
for initrd in initrds.split():
# Split up initrd at bracket and replace glob with kernel version string if brackets exists.
- head, sep, tail = initrd.rpartition("[")
- if sep :
- initrd=os.path.normpath("{base_path}/{initrd}{kext}".format(base_path = base_path, initrd = head, kext = kext))
+ head1, sep1, tail1 = initrd.rpartition("[")
+ if sep1:
+ head2, sep2, tail2 = tail1.partition("]")
+ if sep2:
+ initrd = os.path.normpath("{base_path}/{initrd}{kext}{iext}".format(base_path = base_path, initrd = head1, kext = kext, iext = tail2))
+ else:
+ #Shouldn't be here. just add original initrd value
+ initrd = os.path.normpath("{base_path}/{initrd}".format(base_path = base_path, initrd = initrd))
else:
- initrd=os.path.normpath("{base_path}/{initrd}".format(base_path = base_path, initrd = tail))
+ initrd=os.path.normpath("{base_path}/{initrd}".format(base_path = base_path, initrd = tail1))
if os.path.exists(initrd):
found.append(initrd)
View
2 sbin/boot-update
@@ -26,7 +26,7 @@ GREEN = "\x1b[32;01m"
RED = "\x1b[31;01m"
PURP = "\x1b[35;01m"
OFF = "\x1b[0m"
-version = "1.6.3"
+version = "1.6.4"
verbose = False
def banner(extra=True):

0 comments on commit 27d9dfb

Please sign in to comment.