projects
/
grml2usb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bee7ad5
)
Improve lilo support
author
Michael Prokop
<mika@grml.org>
Tue, 17 Feb 2009 00:17:18 +0000
(
01:17
+0100)
committer
Michael Prokop
<mika@grml.org>
Tue, 17 Feb 2009 00:17:18 +0000
(
01:17
+0100)
grml2usb.8.txt
patch
|
blob
|
history
grml2usb.py
patch
|
blob
|
history
diff --git
a/grml2usb.8.txt
b/grml2usb.8.txt
index
40e6fa8
..
e26d7d3
100644
(file)
--- a/
grml2usb.8.txt
+++ b/
grml2usb.8.txt
@@
-87,8
+87,10
@@
option *--initrd* as well. (Be aware when using multiboot setup.)
*--lilo=...*::
*--lilo=...*::
-Use specified lilo executable to for installing master boot record (MBR)
-instead of the default, being /usr/share/grml2usb/lilo/lilo.static.
+Use specified lilo executable for installing master boot record (MBR). By
+default any system wide (from $PATH) lilo executable is taken. If there can not
+be find any lilo executable the statically compiled version of the grml2usb
+Debian package (see /usr/share/grml2usb/lilo/lilo.static.[amd64|i386]) is taken.
*--mbr*::
*--mbr*::
diff --git
a/grml2usb.py
b/grml2usb.py
index
88de8ba
..
ff8f96c
100755
(executable)
--- 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"
if not is_writeable(device):
raise IOError, "device not writeable for user"
+ # use specified lilo
if options.lilo:
lilo = options.lilo
else:
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:
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"
if not is_exe(lilo):
raise Exception, "lilo executable can not be execute"