diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-14 17:51:27 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-14 17:51:27 +0200 |
commit | ec27ae1489f92848d03d950a40d0ac96ca68216a (patch) | |
tree | 8e4ddc293f5ea6402b4980f7e5872cfc477ff1d0 | |
parent | 9b5f9b49c6a0e628ec3b153c75a1edd4aa03fb95 (diff) | |
download | nixos-ec27ae1489f92848d03d950a40d0ac96ca68216a.tar nixos-ec27ae1489f92848d03d950a40d0ac96ca68216a.tar.gz nixos-ec27ae1489f92848d03d950a40d0ac96ca68216a.tar.bz2 nixos-ec27ae1489f92848d03d950a40d0ac96ca68216a.tar.xz nixos-ec27ae1489f92848d03d950a40d0ac96ca68216a.zip |
propagate exit code
-rw-r--r-- | custom/lvm-snapshots.nix | 5 |
1 files changed, 4 insertions, 1 deletions
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 { | |||
82 | 82 | ||
83 | script = '' | 83 | script = '' |
84 | ( | 84 | ( |
85 | flock -xn -E 4 9 || exit 1 | 85 | flock -xn -E 4 9 |
86 | if [[ "$?" -ne 0 ]]; then | ||
87 | exit $? | ||
88 | fi | ||
86 | 89 | ||
87 | lvcreate -s ${scfg.cowSize} --name ${snapshotName name} ${scfg.VG}/${scfg.LV} | 90 | lvcreate -s ${scfg.cowSize} --name ${snapshotName name} ${scfg.VG}/${scfg.LV} |
88 | 91 | ||