summary refs log tree commit diff
path: root/nixos/modules/virtualisation/brightbox-image.nix
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2017-10-08 15:35:47 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2017-10-14 15:29:02 +0200
commit0ff4bb5f875afe8eb208bbabb3f52dc29539d2bc (patch)
tree5057f780699fcd8ca99ce859ff25b79ea734120f /nixos/modules/virtualisation/brightbox-image.nix
parent415db05504cdf8422fd8b681fd1f1e91b920230a (diff)
downloadnixpkgs-0ff4bb5f875afe8eb208bbabb3f52dc29539d2bc.tar
nixpkgs-0ff4bb5f875afe8eb208bbabb3f52dc29539d2bc.tar.gz
nixpkgs-0ff4bb5f875afe8eb208bbabb3f52dc29539d2bc.tar.bz2
nixpkgs-0ff4bb5f875afe8eb208bbabb3f52dc29539d2bc.tar.lz
nixpkgs-0ff4bb5f875afe8eb208bbabb3f52dc29539d2bc.tar.xz
nixpkgs-0ff4bb5f875afe8eb208bbabb3f52dc29539d2bc.tar.zst
nixpkgs-0ff4bb5f875afe8eb208bbabb3f52dc29539d2bc.zip
nixos: run parted with --script option
-s, --script: never prompts for user intervention

Sometimes the NixOS installer tests fail when they invoke parted, e.g.
https://hydra.nixos.org/build/62513826/nixlog/1. But instead of exiting
right there, the tests hang until the Nix builder times out (and kills
the build). With this change the tests would instead fail immediately,
which is preferred.

While at it, use "parted --script" treewide, so nobody gets build
timeout due to parted error (or misuse). (Only nixos/ use it, and only
non-interactive.)

A few instances already use the short option "-s", convert them to long
option "--short".
Diffstat (limited to 'nixos/modules/virtualisation/brightbox-image.nix')
-rw-r--r--nixos/modules/virtualisation/brightbox-image.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/virtualisation/brightbox-image.nix b/nixos/modules/virtualisation/brightbox-image.nix
index 7f45f0f34f7..08bbcfd9d7c 100644
--- a/nixos/modules/virtualisation/brightbox-image.nix
+++ b/nixos/modules/virtualisation/brightbox-image.nix
@@ -33,9 +33,9 @@ in
         }
         ''
           # Create partition table
-          ${pkgs.parted}/sbin/parted /dev/vda mklabel msdos
-          ${pkgs.parted}/sbin/parted /dev/vda mkpart primary ext4 1 ${diskSize}
-          ${pkgs.parted}/sbin/parted /dev/vda print
+          ${pkgs.parted}/sbin/parted --script /dev/vda mklabel msdos
+          ${pkgs.parted}/sbin/parted --script /dev/vda mkpart primary ext4 1 ${diskSize}
+          ${pkgs.parted}/sbin/parted --script /dev/vda print
           . /sys/class/block/vda1/uevent
           mknod /dev/vda1 b $MAJOR $MINOR