projects
/
grml2usb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ad536c6
)
Modified grml2usb to be able to run on a generated grml2usb iso/directory.
author
Ulrich Dangel
<uli@spamt.net>
Mon, 26 Oct 2009 23:22:39 +0000
(
00:22
+0100)
committer
Ulrich Dangel
<uli@spamt.net>
Mon, 26 Oct 2009 23:22:39 +0000
(
00:22
+0100)
grml2usb
patch
|
blob
|
history
diff --git
a/grml2usb
b/grml2usb
index
7891339
..
7fe8681
100755
(executable)
--- a/
grml2usb
+++ b/
grml2usb
@@
-1139,26
+1139,35
@@
def copy_bootloader_files(iso_mount, target):
if os.path.isfile(syslinux_target + 'ldlinux.sys'):
os.unlink(syslinux_target + 'ldlinux.sys')
if os.path.isfile(syslinux_target + 'ldlinux.sys'):
os.unlink(syslinux_target + 'ldlinux.sys')
- if not search_file('default.cfg', iso_mount + '/boot/isolinux/'):
+ bootloader_dirs = ['/boot/isolinux/', '/boot/syslinux/']
+ source_dir = None
+ for dir in bootloader_dirs:
+ if glob.glob(iso_mount + dir + '*default.cfg'):
+ source_dir = dir
+ break
+ else:
logging.critical("Fatal: file default.cfg could not be found.")
logging.critical("Note: this grml2usb version requires an ISO generated by grml-live >=0.9.24 ...")
logging.critical(" ... either use grml releases >=2009.10 or switch to an older grml2usb version.")
logging.critical(" Please visit http://grml.org/grml2usb/#grml2usb-compat for further information.")
raise
logging.critical("Fatal: file default.cfg could not be found.")
logging.critical("Note: this grml2usb version requires an ISO generated by grml-live >=0.9.24 ...")
logging.critical(" ... either use grml releases >=2009.10 or switch to an older grml2usb version.")
logging.critical(" Please visit http://grml.org/grml2usb/#grml2usb-compat for further information.")
raise
- for
filename in '
default.cfg', 'distri.cfg', \
- 'grml.cfg', 'grml.png', 'hd.cfg', 'isolinux.cfg', 'isolinux.bin', \
+ for
expr in '*
default.cfg', 'distri.cfg', \
+ '
*
grml.cfg', 'grml.png', 'hd.cfg', 'isolinux.cfg', 'isolinux.bin', \
'isoprompt.cfg', 'options.cfg', \
'prompt.cfg', 'vesamenu.c32', 'vesamenu.cfg', 'grml.png':
'isoprompt.cfg', 'options.cfg', \
'prompt.cfg', 'vesamenu.c32', 'vesamenu.cfg', 'grml.png':
- path = search_file(filename, iso_mount + '/boot/isolinux/')
- exec_rsync(path, syslinux_target + filename)
+ files = glob.glob(iso_mount + source_dir + expr)
+ for path in files:
+ filename = os.path.basename(path)
+ exec_rsync(path, syslinux_target + filename)
# copy the addons_*.cfg file to the new syslinux directory
# copy the addons_*.cfg file to the new syslinux directory
- for filename in glob.glob(iso_mount +
'/boot/isolinux/'
+ 'addon*.cfg'):
+ for filename in glob.glob(iso_mount +
source_dir
+ 'addon*.cfg'):
exec_rsync(filename, syslinux_target)
exec_rsync(filename, syslinux_target)
- path = search_file('hidden.cfg', iso_mount + '/boot/isolinux/')
- exec_rsync(path, syslinux_target + "new_" + 'hidden.cfg')
+ path = search_file('hidden.cfg', iso_mount + source_dir)
+ if path:
+ exec_rsync(path, syslinux_target + "new_" + 'hidden.cfg')
grub_target = target + '/boot/grub/'
grub_target = target + '/boot/grub/'
@@
-1534,7
+1543,8
@@
def handle_syslinux_config(grml_flavour, target):
prompt_name.close()
initial_syslinux_config(syslinux_target)
prompt_name.close()
initial_syslinux_config(syslinux_target)
- modify_filenames(grml_flavour, syslinux_target, ['grml.cfg', 'default.cfg'])
+ if search_file('default.cfg', syslinux_target):
+ modify_filenames(grml_flavour, syslinux_target, ['grml.cfg', 'default.cfg'])
filename = search_file("new_hidden.cfg", syslinux_target)
filename = search_file("new_hidden.cfg", syslinux_target)