summaryrefslogtreecommitdiff
path: root/vmdebootstrap
diff options
context:
space:
mode:
authorNeil Williams <codehelp@debian.org>2015-11-07 13:55:59 +0000
committerNeil Williams <codehelp@debian.org>2015-11-07 13:55:59 +0000
commitdb38325320192998f1abe6d97c3d35b57d5306d9 (patch)
tree4a3f266f85955c987874170a80a269c46fd51695 /vmdebootstrap
parent66614ed9bc09d6ad817df655cd7249c2104b7ac7 (diff)
downloadvmdebootstrap-db38325320192998f1abe6d97c3d35b57d5306d9.tar.gz
Undo the update-initramfs change, not appropriate.
Diffstat (limited to 'vmdebootstrap')
-rw-r--r--vmdebootstrap/filesystem.py13
1 files changed, 6 insertions, 7 deletions
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