Revision e0eb63f0 Ganeti/HTools/CLI.hs

b/Ganeti/HTools/CLI.hs
10 10
    (
11 11
      parseOpts
12 12
    , showVersion
13
    , shTemplate
13 14
    ) where
14 15

  
15 16
import System.Console.GetOpt
......
54 55
           name Version.version
55 56
           compilerName (Data.Version.showVersion compilerVersion)
56 57
           os arch
58

  
59
-- | A shell script template for autogenerated scripts
60
shTemplate :: String
61
shTemplate =
62
    printf "#!/bin/sh\n\n\
63
           \# Auto-generated script for executing cluster rebalancing\n\n\
64
           \# To stop, touch the file /tmp/stop-htools\n\n\
65
           \set -e\n\n\
66
           \check() {\n\
67
           \  if [ -f /tmp/stop-htools ]; then\n\
68
           \    echo 'Stop requested, exiting'\n\
69
           \    exit 0\n\
70
           \  fi\n\
71
           \}\n\n"

Also available in: Unified diff