From: Neil Williams Date: Tue, 26 Aug 2014 20:28:06 +0000 (-0700) Subject: Make x86 calls conditional to allow for use on other linux architectures. X-Git-Url: https://git.siccegge.de//index.cgi?p=forks%2Fvmdebootstrap.git;a=commitdiff_plain;h=df8518ebe4a429d68e814a7daae2621db132c61d Make x86 calls conditional to allow for use on other linux architectures. --- diff --git a/vmdebootstrap b/vmdebootstrap index 7f76b14..5fd2a09 100755 --- a/vmdebootstrap +++ b/vmdebootstrap @@ -242,8 +242,9 @@ class VmDebootstrap(cliapp.Application): 'set', '1', 'boot', 'on']) def install_mbr(self): - self.message('Installing MBR') - self.runcmd(['install-mbr', self.settings['image']]) + if os.path.exists("/sbin/install-mbr"): + self.message('Installing MBR') + self.runcmd(['install-mbr', self.settings['image']]) def setup_kpartx(self): out = self.runcmd(['kpartx', '-avs', self.settings['image']]) @@ -440,6 +441,9 @@ class VmDebootstrap(cliapp.Application): f.write('\nS0:23:respawn:%s\n' % serial_command) def install_extlinux(self, rootdev, rootdir): + if not os.path.exists("/usr/bin/extlinux"): + self.message("extlinux not installed, skipping.") + return self.message('Installing extlinux') def find(pattern):