summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2016-06-13 18:44:36 -0400
committerJoey Hess2016-06-13 18:44:36 -0400
commitb75ee60844fc56d361c5fac5a1038eebd33f26ba (patch)
treeda50de2d051969ead041975e11990ea2bbddd1ab
parent7d18d057eb4f2e4ad7f7fd578b3e33564f1c8c7a (diff)
use new StopPropellorException
-rw-r--r--src/Propellor/Property/Reboot.hs12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Propellor/Property/Reboot.hs b/src/Propellor/Property/Reboot.hs
index 5bb426d5..feb08694 100644
--- a/src/Propellor/Property/Reboot.hs
+++ b/src/Propellor/Property/Reboot.hs
@@ -81,13 +81,15 @@ toKernelNewerThan ver =
if runningV >= wantV then noChange
else if installedV >= wantV
then ensureProperty w now
- -- We error out here because other properties
- -- may be incorrectly ensured on a version
- -- that's too old. E.g. Sbuild.built can fail
+ -- Stop propellor here because other
+ -- properties may be incorrectly ensured
+ -- under a kernel version that's too old.
+ -- E.g. Sbuild.built can fail
-- to add the config line `union-type=overlay`
- else errorMessage ("kernel newer than "
+ else throwM $ StopPropellorException $
+ "kernel newer than "
++ ver
- ++ " not installed")
+ ++ " not installed"
runningInstalledKernel :: IO Bool
runningInstalledKernel = do