From db38325320192998f1abe6d97c3d35b57d5306d9 Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Sat, 7 Nov 2015 13:55:59 +0000 Subject: Undo the update-initramfs change, not appropriate. --- vmdebootstrap/filesystem.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'vmdebootstrap') diff --git a/vmdebootstrap/filesystem.py b/vmdebootstrap/filesystem.py index f703f42..a26145c 100644 --- a/vmdebootstrap/filesystem.py +++ b/vmdebootstrap/filesystem.py @@ -70,14 +70,13 @@ class Filesystem(Base): runcmd(["chown", "-R", self.settings["owner"], filename]) def update_initramfs(self): - if not self.devices['rootdir']: + rootdir = self.devices['rootdir'] + if not rootdir: raise cliapp.AppException("rootdir not set") - runcmd([ - 'chroot', self.devices['rootdir'], 'dpkg-trigger', - '--by-package', 'vmdebootstrap', 'update-initramfs']) - runcmd([ - 'chroot', self.devices['rootdir'], - 'dpkg', '--triggers-only', '-a']) + cmd = os.path.join('usr', 'sbin', 'update-initramfs') + if os.path.exists(os.path.join(str(rootdir), cmd)): + self.message("Updating the initramfs") + runcmd(['chroot', rootdir, cmd, '-u']) def setup_kpartx(self): bootindex = None -- cgit v1.2.1