From 8bee5e779695c51169251e95a78726b4d4ceee8a Mon Sep 17 00:00:00 2001 From: "Carl D. Roth" Date: Wed, 30 Nov 2016 18:23:34 -0800 Subject: [PATCH] Refactor the unmount part of the initrd context shutdown --- .../src/python/onl/install/InstallUtils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py b/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py index 685f703d..c7d3ee14 100644 --- a/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py +++ b/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py @@ -834,7 +834,7 @@ class InitrdContext(SubprocessMixin): return self - def shutdown(self): + def unmount(self): p = ProcMountsParser() if self.dir is not None: @@ -852,6 +852,10 @@ class InitrdContext(SubprocessMixin): cmd = ('umount', p,) self.check_call(cmd, vmode=self.V1) + def shutdown(self): + + self.unmount() + if self.initrd and self.dir: self.log.debug("cleaning up chroot in %s", self.dir) self.rmtree(self.dir)