Skip to content

Commit

Permalink
backends/hetzner: Create /mnt/run if not existing.
Browse files Browse the repository at this point in the history
We need to create this in _bootstrap_rescue_for_existing_system() to
make sure the bootstrap even works for NixOS 14.12, because when
bootstrapping, /run isn't yet available.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
  • Loading branch information
aszlig committed Oct 31, 2015
1 parent 35f0663 commit f451980
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nixops/backends/hetzner.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ def _bootstrap_rescue_for_existing_system(self):
Make sure that an existing system is easy to work on and set everything
up properly to enter a chrooted shell on the target system.
"""
self.log_start("mounting /run... ")
self.log_start("mounting /mnt/run... ")
self.run_command("mkdir -m 0755 -p /mnt/run")
self.run_command("mount -t tmpfs -o mode=0755 none /mnt/run")
self.log_end("done.")

self.log_start("symlinking /run/current-system... ")
self.log_start("symlinking /mnt/run/current-system... ")
self.run_command("ln -s /nix/var/nix/profiles/system "
"/mnt/run/current-system")
self.log_end("done.")
Expand Down

0 comments on commit f451980

Please sign in to comment.