]> git.siccegge.de Git - forks/vmdebootstrap.git/commitdiff
Make x86 calls conditional to allow for use on other linux architectures.
authorNeil Williams <codehelp@debian.org>
Tue, 26 Aug 2014 20:28:06 +0000 (13:28 -0700)
committerNeil Williams <codehelp@debian.org>
Tue, 26 Aug 2014 20:28:06 +0000 (13:28 -0700)
vmdebootstrap

index 7f76b14a10ccb20d0f41b5a9c1d9fb5e991b025b..5fd2a096c04fe189da1a96d482fcbee2e4af1057 100755 (executable)
@@ -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):