From ec27ae1489f92848d03d950a40d0ac96ca68216a Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 14 Apr 2018 17:51:27 +0200 Subject: propagate exit code --- custom/lvm-snapshots.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'custom') diff --git a/custom/lvm-snapshots.nix b/custom/lvm-snapshots.nix index 5e4557f3..5525f822 100644 --- a/custom/lvm-snapshots.nix +++ b/custom/lvm-snapshots.nix @@ -82,7 +82,10 @@ in { script = '' ( - flock -xn -E 4 9 || exit 1 + flock -xn -E 4 9 + if [[ "$?" -ne 0 ]]; then + exit $? + fi lvcreate -s ${scfg.cowSize} --name ${snapshotName name} ${scfg.VG}/${scfg.LV} -- cgit v1.2.3