diff options
author | tv <tv@krebsco.de> | 2017-06-29 22:04:58 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2017-06-29 22:04:58 +0200 |
commit | 077a6a699129416cdeb0a9da3aba30d156e46b7a (patch) | |
tree | d5588c0024a942fef6f4d597aedac5708dd7fa45 /krebs/4lib/infest | |
parent | 10adb2d27e3005c7239585eb38dbbe3b5b01a400 (diff) | |
parent | 51e091c7c3fb52579bc9ed59d1c7db633cd24e5b (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'krebs/4lib/infest')
-rw-r--r-- | krebs/4lib/infest/prepare.sh | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/krebs/4lib/infest/prepare.sh b/krebs/4lib/infest/prepare.sh index 50d521e17..8e921ce06 100644 --- a/krebs/4lib/infest/prepare.sh +++ b/krebs/4lib/infest/prepare.sh @@ -36,14 +36,7 @@ prepare() {( ;; esac ;; - nixos) - case $(cat /proc/cmdline) in - *' root=LABEL=NIXOS_ISO '*) - prepare_nixos_iso "$@" - exit - esac - ;; - stockholm) + nixos|stockholm) case $(cat /proc/cmdline) in *' root=LABEL=NIXOS_ISO '*) prepare_nixos_iso "$@" @@ -102,7 +95,8 @@ prepare_nixos_iso() { mkdir -p bin rm -f bin/nixos-install cp "$(type -p nixos-install)" bin/nixos-install - sed -i "s@^NIX_PATH=\"[^\"]*\"@NIX_PATH=$target_path@" bin/nixos-install + sed -i 's@^\(\(export \|\)NIX_PATH\)=\"[^\"]*\"@\1=$target_path@' bin/nixos-install + } get_nixos_install() { @@ -217,7 +211,7 @@ prepare_common() {( mkdir -p bin rm -f bin/nixos-install cp "$(type -p nixos-install)" bin/nixos-install - sed -i "s@^NIX_PATH=\"[^\"]*\"@NIX_PATH=$target_path@" bin/nixos-install + sed -i 's@^\(\(export \|\)NIX_PATH\)=\"[^\"]*\"@\1=$target_path@' bin/nixos-install if ! grep -q '^PATH.*#krebs' .bashrc; then echo '. /root/.nix-profile/etc/profile.d/nix.sh' >> .bashrc |