(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rcm_script_version='> name:rcm_script_version) op: assign_op.Equal rhs: {<1>} spids: [90] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'rcm_script_func_info='> name: rcm_script_func_info ) op: assign_op.Equal rhs: {(DQ <'SDP (un)configuration rcm script'>)} spids: [93] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rcm_cmd_timeout='> name:rcm_cmd_timeout) op: assign_op.Equal rhs: {<10>} spids: [98] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'rcm_resource_name='> name:rcm_resource_name) op: assign_op.Equal rhs: {<'/devices/ib/sdpib'> <Id.Lit_At '@'> <0> <Id.Lit_Colon ':'> <sdpib>} spids: [101] ) ] redirects: [] ) (command.ShFunction name: do_scriptinfo body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Sentence child: (C {<printf>} {(DQ <'rcm_script_version=%d'> <Id.Lit_BadBackslash '\\'> <n>)} {($ Id.VSub_DollarName rcm_script_version)} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<printf>} { (DQ <'rcm_script_func_info='> ($ Id.VSub_DollarName rcm_script_func_info) <Id.Lit_BadBackslash '\\'> <n> ) } ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<printf>} {(DQ <'rcm_cmd_timeout=%d'> <Id.Lit_BadBackslash '\\'> <n>)} {($ Id.VSub_DollarName rcm_cmd_timeout)} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) terminator: <Id.Op_Semi _> ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: do_register body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Sentence child: (C {<printf>} {(DQ <'rcm_resource_name=%s'> <Id.Lit_BadBackslash '\\'> <n>)} {($ Id.VSub_DollarName rcm_resource_name)} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) terminator: <Id.Op_Semi _> ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: do_resourceinfo body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<x> (DQ ($ Id.VSub_Number 1))} {<Id.Lit_Equals '='>} {<x> (DQ <'/devices/ib/sdpib@0:sdpib'>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.Sentence child: (C {<printf>} { (DQ <'rcm_resource_usage_info=SDP IB device 0'> <Id.Lit_BadBackslash '\\'> <n> ) } ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) terminator: <Id.Op_Semi _> ) ] spids: [193 212] ) ] else_action: [ (command.Sentence child: (C {<printf>} {(DQ <'rcm_failure_reason=Unknown SDP device'> <Id.Lit_BadBackslash '\\'> <n>)} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>}) terminator: <Id.Op_Semi _> ) ] redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: do_queryremove body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'status='> name:status) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<sdpadm>} {<status>}) right: <Id.Backtick_Right '`'> ) } spids: [262] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'ret='> name:ret) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} spids: [272] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName ret)} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName status))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <'SDP is Disabled'>)} {<Id.Lit_RBracket ']'>} ) ] ) ] ) action: [ (C {<printf>} {(DQ <'rcm_log_warn=SDP is enabled. Please run \'sdpadm disable\' command '>)} ) (command.Sentence child: (C {<printf>} {(DQ <'before un-configuring IB HCA/SDP'> <Id.Lit_BadBackslash '\\'> <n>)} ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<printf>} { (DQ <'rcm_failure_reason=SDP is enabled on this system'> <Id.Lit_BadBackslash '\\'> <n> ) } ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>}) terminator: <Id.Op_Semi _> ) ] spids: [277 307] ) (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName ret)} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<printf>} {(DQ <'rcm_log_warn=\'sdpadm status\' command failed. Could not find the '>)} ) (command.Sentence child: (C {<printf>} {(DQ <'status of SDP'> <Id.Lit_BadBackslash '\\'> <n>)}) terminator: <Id.Op_Semi _> ) (command.Sentence child: (C {<printf>} { (DQ <'rcm_failure_reason=\'sdpadm status\' command failed.'> <Id.Lit_BadBackslash '\\'> <n> ) } ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) terminator: <Id.Op_Semi _> ) ] spids: [343 356] ) ] else_action: [] redirects: [] ) (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) terminator: <Id.Op_Semi _> ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: do_preremove body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) terminator: <Id.Op_Semi _> ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: do_undoremove body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) terminator: <Id.Op_Semi _> ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShFunction name: do_postremove body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) terminator: <Id.Op_Semi _> ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Case to_match: {(DQ ($ Id.VSub_Number 1))} arms: [ (case_arm pat_list: [{<scriptinfo>}] action: [(C {<do_scriptinfo>})] spids: [458 459 462 -1] ) (case_arm pat_list: [{<register>}] action: [(C {<do_register>})] spids: [465 466 469 -1] ) (case_arm pat_list: [{<resourceinfo>}] action: [(C {<do_resourceinfo>} {($ Id.VSub_Number 2)})] spids: [472 473 478 -1] ) (case_arm pat_list: [{<queryremove>}] action: [(C {<do_queryremove>} {($ Id.VSub_Number 2)})] spids: [481 482 487 -1] ) (case_arm pat_list: [{<preremove>}] action: [(C {<do_preremove>} {($ Id.VSub_Number 2)})] spids: [490 491 496 -1] ) (case_arm pat_list: [{<undoremove>}] action: [(C {<do_undoremove>} {($ Id.VSub_Number 2)})] spids: [499 500 505 -1] ) (case_arm pat_list: [{<postremove>}] action: [(C {<do_postremove>} {($ Id.VSub_Number 2)})] spids: [508 509 514 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<echo>} {<Unknown>} {<option>} {($ Id.VSub_Number 1)})] spids: [517 518 527 -1] ) ] redirects: [] ) ] )