From dc653449c541312a120b2dd25fad118e04828b62 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Sun, 10 Jun 2018 20:18:55 +0000 Subject: nixos: boot/stage-1: check syntax of the generated script --- nixos/modules/system/boot/stage-1.nix | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'nixos/modules/system/boot') diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 71b806a0b4e1..2caab69cbb95 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -248,6 +248,14 @@ let isExecutable = true; + postInstall = '' + echo checking syntax + # check both with bash + ${pkgs.bash}/bin/sh -n $target + # and with ash shell, just in case + ${extraUtils}/bin/ash -n $target + ''; + inherit udevRules extraUtils modulesClosure; inherit (config.boot) resumeDevice; -- cgit 1.4.1