projects
/
grml2usb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update TODO section in grml2iso
[grml2usb.git]
/
grml2usb
diff --git
a/grml2usb
b/grml2usb
index
85529c3
..
7cc07c3
100755
(executable)
--- a/
grml2usb
+++ b/
grml2usb
@@
-867,7
+867,7
@@
def mount(source, target, mount_options):
raise CriticalException("Error executing mount: %s already mounted - please unmount before invoking grml2usb" % source)
if os.path.isdir(source):
raise CriticalException("Error executing mount: %s already mounted - please unmount before invoking grml2usb" % source)
if os.path.isdir(source):
- logging.debug("Source %s is not a device,
not mounting therefor
." % source)
+ logging.debug("Source %s is not a device,
therefore not mounting
." % source)
return 0
logging.debug("mount %s %s %s" % (mount_options, source, target))
return 0
logging.debug("mount %s %s %s" % (mount_options, source, target))
@@
-1195,14
+1195,14
@@
def install_iso_files(grml_flavour, iso_mount, device, target):
if not options.skipaddons:
if grml_flavour.endswith('-small'):
if not options.skipaddons:
if grml_flavour.endswith('-small'):
- logging.info("Note: grml-small doesn't provide any addons, not installing them therefor.")
+ logging.info("Note: grml-small doesn't provide any addons, not installing them therefor
e
.")
else:
copy_addons(iso_mount, target)
if not options.copyonly:
copy_bootloader_files(iso_mount, target)
else:
copy_addons(iso_mount, target)
if not options.copyonly:
copy_bootloader_files(iso_mount, target)
- if not options.dryrun
and not os.path.isdir(device)
:
+ if not options.dryrun:
handle_bootloader_config(grml_flavour, device, target)
# make sure we sync filesystems before returning
handle_bootloader_config(grml_flavour, device, target)
# make sure we sync filesystems before returning
@@
-1344,11
+1344,13
@@
def handle_grub_config(grml_flavour, device, target):
grub_target = target + '/boot/grub/'
execute(mkdir, grub_target)
grub_target = target + '/boot/grub/'
execute(mkdir, grub_target)
- # we have to adjust root() inside grub configuration
- if device[-1:].isdigit():
- install_grub1_partition = int(device[-1:]) - 1
+ if os.path.isdir(device):
+ install_grub1_partition = None
else:
else:
- raise CriticalException("error validating partition schema (raw device?)")
+ if device[-1:].isdigit():
+ install_grub1_partition = int(device[-1:]) - 1
+ else:
+ raise CriticalException("error validating partition schema (raw device?)")
# do NOT write "None" in kernel cmdline
if options.bootoptions is None:
# do NOT write "None" in kernel cmdline
if options.bootoptions is None:
@@
-1357,7
+1359,8
@@
def handle_grub_config(grml_flavour, device, target):
bootopt = options.bootoptions
# write menu.lst
bootopt = options.bootoptions
# write menu.lst
- handle_grub1_config(grml_flavour, install_grub1_partition, grub_target, bootopt)
+ if install_grub1_partition:
+ handle_grub1_config(grml_flavour, install_grub1_partition, grub_target, bootopt)
# write grub.cfg
handle_grub2_config(grml_flavour, grub_target, bootopt)
# write grub.cfg
handle_grub2_config(grml_flavour, grub_target, bootopt)
@@
-1457,7
+1460,7
@@
def handle_dir(live_image, device):
logging.info("Using %s as install base" % live_image)
if os.path.isdir(device):
logging.info("Using %s as install base" % live_image)
if os.path.isdir(device):
- logging.info("Specified target is a directory,
not mounting therefor
.")
+ logging.info("Specified target is a directory,
therefore not mounting
.")
device_mountpoint = device
remove_device_mountpoint = False
else:
device_mountpoint = device
remove_device_mountpoint = False
else:
@@
-1514,7
+1517,7
@@
def handle_iso(iso, device):
sys.exit(1)
if os.path.isdir(device):
sys.exit(1)
if os.path.isdir(device):
- logging.info("Specified target is a directory,
not mounting therefor
.")
+ logging.info("Specified target is a directory,
therefore not mounting
.")
device_mountpoint = device
remove_device_mountpoint = False
# skip_mbr = True
device_mountpoint = device
remove_device_mountpoint = False
# skip_mbr = True
@@
-1573,7
+1576,7
@@
def handle_mbr(device):
skip_install_mir_mbr = False
# if we get e.g. /dev/loop1 as device we don't want to put the MBR
skip_install_mir_mbr = False
# if we get e.g. /dev/loop1 as device we don't want to put the MBR
- # into /dev/loop of course, therefor use /dev/loop1 as mbr_device
+ # into /dev/loop of course, therefor
e
use /dev/loop1 as mbr_device
if mbr_device == "/dev/loop":
mbr_device = device
logging.info("Detected loop device - using %s as MBR device therefore" % mbr_device)
if mbr_device == "/dev/loop":
mbr_device = device
logging.info("Detected loop device - using %s as MBR device therefore" % mbr_device)
@@
-1627,7
+1630,7
@@
def handle_vfat(device):
logging.critical("Execution failed: %s", error)
sys.exit(1)
logging.critical("Execution failed: %s", error)
sys.exit(1)
- if not
check_for_usbdevice(device) and not os.path.isdir
(device):
+ if not
os.path.isdir(device) and not check_for_usbdevice
(device):
print "Warning: the specified device %s does not look like a removable usb device." % device
f = raw_input("Do you really want to continue? y/N ")
if f == "y" or f == "Y":
print "Warning: the specified device %s does not look like a removable usb device." % device
f = raw_input("Do you really want to continue? y/N ")
if f == "y" or f == "Y":