summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-06-21 13:43:04 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-06-21 13:43:04 -0400
commit229a28cbf95e7c7003e64255b1e3cd07f3c416cb (patch)
treedc547b78a78f5327272623be5c60effae605e53d
parent28eff15a84cef8215903c9996ec20d8af4fce286 (diff)
check in configure if ionice -c3 works
On old systems, it may need to be run as root.
-rw-r--r--Build/Configure.hs2
-rw-r--r--Command/Assistant.hs3
2 files changed, 3 insertions, 2 deletions
diff --git a/Build/Configure.hs b/Build/Configure.hs
index e32017ec3..3195bcdcf 100644
--- a/Build/Configure.hs
+++ b/Build/Configure.hs
@@ -31,7 +31,7 @@ tests =
, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null"
, TestCase "wget" $ testCmd "wget" "wget --version >/dev/null"
, TestCase "bup" $ testCmd "bup" "bup --version >/dev/null"
- , TestCase "ionice" $ testCmd "ionice" "ionice --version >/dev/null"
+ , TestCase "ionice" $ testCmd "ionice" "ionice -c3 true >/dev/null"
, TestCase "gpg" $ maybeSelectCmd "gpg"
[ ("gpg", "--version >/dev/null")
, ("gpg2", "--version >/dev/null") ]
diff --git a/Command/Assistant.hs b/Command/Assistant.hs
index a8928bcf4..f65bed736 100644
--- a/Command/Assistant.hs
+++ b/Command/Assistant.hs
@@ -13,6 +13,7 @@ import qualified Option
import qualified Command.Watch
import Init
import Config.Files
+import qualified Build.SysConfig
import System.Environment
@@ -55,7 +56,7 @@ autoStart = do
f <- autoStartFile
error $ "Nothing listed in " ++ f
program <- readProgramFile
- haveionice <- inPath "ionice"
+ haveionice <- pure Build.SysConfig.ionice <&&> inPath "ionice"
forM_ dirs $ \d -> do
putStrLn $ "git-annex autostart in " ++ d
ifM (catchBoolIO $ go haveionice program d)