From 0ff4bb5f875afe8eb208bbabb3f52dc29539d2bc Mon Sep 17 00:00:00 2001 From: Bjørn Forsman Date: Sun, 8 Oct 2017 15:35:47 +0200 Subject: 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". --- nixos/lib/make-disk-image.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nixos/lib') diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index d4b2e338c3e..9fa848301f6 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -80,7 +80,7 @@ let truncate -s ${toString diskSize}M $diskImage ${if partitioned then '' - parted $diskImage -- mklabel msdos mkpart primary ext4 1M -1s + parted --script $diskImage -- mklabel msdos mkpart primary ext4 1M -1s offset=$((2048*512)) '' else '' offset=0 -- cgit 1.4.1