X-Git-Url: https://git.grml.org/?p=grml2usb.git;a=blobdiff_plain;f=grml2usb.py;h=ff8f96c6e27117234d1cc8e24b23607a82584874;hp=88de8ba148c8f3d3409d05599d2645e851b06613;hb=32a796adb98b54fbde22333031e0810355ac4989;hpb=bee7ad514e292ec01af793e91d6b82e0ded845e7 diff --git a/grml2usb.py b/grml2usb.py index 88de8ba..ff8f96c 100755 --- a/grml2usb.py +++ b/grml2usb.py @@ -406,14 +406,21 @@ def install_mbr(device): if not is_writeable(device): raise IOError, "device not writeable for user" + # use specified lilo if options.lilo: lilo = options.lilo else: - from platform import architecture - if architecture()[0] == '64bit': - lilo = '/usr/share/grml2usb/lilo/lilo.static.amd64' + # otherwise try to use system's lilo + if which("lilo"): + lilo = which("lilo") + print "debug: lilo = %s" % lilo else: - lilo = '/usr/share/grml2usb/lilo/lilo.static.i386' + # finally fall back to our static version + from platform import architecture + if architecture()[0] == '64bit': + lilo = '/usr/share/grml2usb/lilo/lilo.static.amd64' + else: + lilo = '/usr/share/grml2usb/lilo/lilo.static.i386' if not is_exe(lilo): raise Exception, "lilo executable can not be execute"