summaryrefslogtreecommitdiff
path: root/vmdebootstrap
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2016-07-31 15:13:37 +0100
committerNeil Williams <codehelp@debian.org>2016-07-31 15:13:37 +0100
commit92f540c3c49410c14330c512c7e5ae9b546d87d9 (patch)
treedafb43b030748367f36dbe276d42d848e4a0f6ee /vmdebootstrap
parent33ed14110e8a8deeb71770e80b6bba28fb3973c6 (diff)
downloadvmdebootstrap-92f540c3c49410c14330c512c7e5ae9b546d87d9.tar.gz
Deprecating extlinux
Working around extlinux failure with ext4. Adding notes on the reasons for moving to grub as default bootloader in a future release.
Diffstat (limited to 'vmdebootstrap')
-rw-r--r--vmdebootstrap/extlinux.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/vmdebootstrap/extlinux.py b/vmdebootstrap/extlinux.py
index b37ee7e..648fce4 100644
--- a/vmdebootstrap/extlinux.py
+++ b/vmdebootstrap/extlinux.py
@@ -91,12 +91,19 @@ append initrd=%(initrd)s root=UUID=%(uuid)s ro %(kserial)s
ext_f = open(conf, 'w')
ext_f.write(msg)
- runcmd(['extlinux', '--install', rootdir])
- runcmd(['sync'])
- time.sleep(2)
+ def run_extlinux_install(self, rootdir):
+ if os.path.exists("/usr/bin/extlinux"):
+ self.message('Running extlinux --install')
+ runcmd(['extlinux', '--install', rootdir])
+ runcmd(['sync'])
+ time.sleep(2)
+ else:
+ msg = "extlinux enabled but /usr/bin/extlinux not found" \
+ " - please install the extlinux package."
+ raise cliapp.AppException(msg)
def install_mbr(self):
- if not self.settings['mbr'] and not self.settings['extlinux']:
+ if not self.settings['mbr'] or not self.settings['extlinux']:
return
if os.path.exists("/sbin/install-mbr"):
self.message('Installing MBR')