Unmount /oldroot and its submounts
@@ -51,8 +51,6 @@ class UnmountOldrootState(OSEncryptionState):
self.context.logger.log("Entering unmount_oldroot state")
- raise Exception("Dummy exception")
-
self.command_executor.ExecuteInBash('mkdir -p /var/empty/sshd', True)
self.command_executor.ExecuteInBash('systemctl restart sshd.service')
self.command_executor.ExecuteInBash('dhclient')
@@ -81,6 +79,10 @@ class UnmountOldrootState(OSEncryptionState):
sleep(3)
+ self.unmount('/oldroot/var')
+ self.unmount('/oldroot/usr')
+ self.unmount('/oldroot')
+
attempt = 1
while True:
