mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-26 01:37:04 +00:00
Refactor the unmount part of the initrd context shutdown
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user