projects
/
grml2usb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c6af951
)
Only modify live-media-path for current flavour
author
Ulrich Dangel
<uli@spamt.net>
Wed, 11 Jan 2012 12:04:03 +0000
(13:04 +0100)
committer
Michael Prokop
<mika@grml.org>
Wed, 11 Jan 2012 15:09:59 +0000
(16:09 +0100)
grml2usb
patch
|
blob
|
history
diff --git
a/grml2usb
b/grml2usb
index
09e9925
..
42426ee
100755
(executable)
--- a/
grml2usb
+++ b/
grml2usb
@@
-1127,13
+1127,15
@@
def handle_grub_config(grml_flavour, device, target):
remove_regexes.append(re.compile(regex))
shortname = get_shortname(grml_flavour)
remove_regexes.append(re.compile(regex))
shortname = get_shortname(grml_flavour)
- for filename in glob.glob(grub_target +
shortname +
'*.cfg'):
+ for filename in glob.glob(grub_target + '*.cfg'):
for line in fileinput.input(filename, inplace=1):
line = line.rstrip("\r\n")
if option_re.search(line):
line = bootid_re.sub('', line)
for line in fileinput.input(filename, inplace=1):
line = line.rstrip("\r\n")
if option_re.search(line):
line = bootid_re.sub('', line)
- line = live_media_path_re.sub('', line)
- line = line.rstrip() + r' live-media-path=/live/%s/ bootid=%s %s ' % (grml_flavour, UUID, bootopt)
+ if shortname in filename:
+ line = live_media_path_re.sub('', line)
+ line = line.rstrip() + ' live-media-path=/live/%s/ ' % (grml_flavour)
+ line = line.rstrip() + r' bootid=%s %s ' % (UUID, bootopt)
for regex in remove_regexes:
line = regex.sub(' ', line)
print line
for regex in remove_regexes:
line = regex.sub(' ', line)
print line