check in configure if ionice -c3 works
On old systems, it may need to be run as root.
This commit is contained in:
parent
5e48aa4d4b
commit
53d52d57c1
2 changed files with 3 additions and 2 deletions
|
@ -31,7 +31,7 @@ tests =
|
||||||
, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null"
|
, TestCase "curl" $ testCmd "curl" "curl --version >/dev/null"
|
||||||
, TestCase "wget" $ testCmd "wget" "wget --version >/dev/null"
|
, TestCase "wget" $ testCmd "wget" "wget --version >/dev/null"
|
||||||
, TestCase "bup" $ testCmd "bup" "bup --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"
|
, TestCase "gpg" $ maybeSelectCmd "gpg"
|
||||||
[ ("gpg", "--version >/dev/null")
|
[ ("gpg", "--version >/dev/null")
|
||||||
, ("gpg2", "--version >/dev/null") ]
|
, ("gpg2", "--version >/dev/null") ]
|
||||||
|
|
|
@ -13,6 +13,7 @@ import qualified Option
|
||||||
import qualified Command.Watch
|
import qualified Command.Watch
|
||||||
import Init
|
import Init
|
||||||
import Config.Files
|
import Config.Files
|
||||||
|
import qualified Build.SysConfig
|
||||||
|
|
||||||
import System.Environment
|
import System.Environment
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ autoStart = do
|
||||||
f <- autoStartFile
|
f <- autoStartFile
|
||||||
error $ "Nothing listed in " ++ f
|
error $ "Nothing listed in " ++ f
|
||||||
program <- readProgramFile
|
program <- readProgramFile
|
||||||
haveionice <- inPath "ionice"
|
haveionice <- pure Build.SysConfig.ionice <&&> inPath "ionice"
|
||||||
forM_ dirs $ \d -> do
|
forM_ dirs $ \d -> do
|
||||||
putStrLn $ "git-annex autostart in " ++ d
|
putStrLn $ "git-annex autostart in " ++ d
|
||||||
ifM (catchBoolIO $ go haveionice program d)
|
ifM (catchBoolIO $ go haveionice program d)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue