~0x44/agent-smith/script_changes_for_testing

« back to all changes in this revision

Viewing changes to scripts/dispatcher.sh

  • Committer: Christopher MacGown
  • Date: 2010-10-07 17:34:17 UTC
  • Revision ID: chris@slicehost.com-20101007173417-90ghivkcr6wesr59
Updates to agent so that all scripts can be executed with messages

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
  declare -f $1 > /dev/null; return $?
44
44
}
45
45
 
 
46
function features() {
 
47
  echo "agentupdate, features, generatehostkeys, injectfile, keyinit, kmsactivate, password, resetnetwork, version" 
 
48
}
 
49
 
46
50
function version() {
47
51
  cat $AGENTSMITHDIR/VERSION
48
52
}
86
90
 
87
91
function parse_message() {
88
92
    case $1 in 
89
 
    "kmsactivate")  action="kms_activate.sh";;
90
 
    "agentupdate")  action="agent_update.sh";;
91
 
    "keyinit")      action="dh_key_init";;
92
 
    "password")     action="reset_password";;
93
 
    "resetnetwork") action="configure_network.sh";;
94
 
    "version")      action="version";;
95
 
    "expanddisk");; # DO NOTHING
 
93
    "agentupdate")      action="update_agent.sh";;
 
94
    "features")         action="features";;
 
95
    "generatehostkeys") action="generate_host_keys.sh";;
 
96
    "injectfile")       action="inject_file.hs";;
 
97
    "keyinit")          action="dh_key_init";;
 
98
    "kmsactivate")      action="kms_activate.sh";;
 
99
    "password")         action="reset_password";;
 
100
    "resetnetwork")     action="configure_network.sh";;
 
101
    "version")          action="version";;
96
102
    esac
97
103
}
98
104