(CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:COUNT) op:Equal rhs:{(0)} spids:[9])] spids: [9] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalNot child: (BoolUnary op_id:BoolUnary_z child:{(DQ ($ VSub_Number "$1"))}) ) ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:WANTED) op: Equal rhs: {(DQ ($ VSub_Number "$1"))} spids: [30] ) ] spids: [30] ) ] spids: [-1 27] ) ] spids: [-1 35] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr:(BoolUnary op_id:BoolUnary_f child:{(cluster.txt)})) terminator: <Op_Semi ";"> ) ] action: [ (While cond: [ (Sentence child: (C {(read)} {(HOSTNAME)} {(MACADDR)} {(IPADDR)} {(ILOIPADDR)} {(DOMAIN)} {(ROLE)}) terminator: <Op_Semi ";"> ) ] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_GlobEqual left: {(DQ ($ VSub_Name "$HOSTNAME"))} right: {(end)} ) ) terminator: <Op_Semi ";"> ) ] action: [(ControlFlow token:<ControlFlow_Continue continue>)] spids: [-1 91] ) ] spids: [-1 97] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalOr left: (BoolUnary op_id: BoolUnary_z child: {(DQ ($ VSub_Name "$WANTED"))} ) right: (LogicalOr left: (BoolBinary op_id: BoolBinary_GlobEqual left: {(DQ ($ VSub_Name "$WANTED"))} right: {(all)} ) right: (LogicalOr left: (BoolBinary op_id: BoolBinary_GlobEqual left: {(DQ ($ VSub_Name "$WANTED"))} right: {(DQ ($ VSub_Name "$ROLE"))} ) right: (LogicalOr left: (BoolBinary op_id: BoolBinary_GlobEqual left: {(DQ ($ VSub_Name "$WANTED"))} right: {(DQ (IPADDR))} ) right: (BoolBinary op_id: BoolBinary_GlobEqual left: {(DQ ($ VSub_Name "$WANTED"))} right: {(DQ ($ VSub_Name "$HOSTNAME"))} ) ) ) ) ) ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ALLHOSTS) op: Equal rhs: {(DQ ($ VSub_Name "$ALLHOSTS") (" ") ($ VSub_Name "$IPADDR"))} spids: [162] ) ] spids: [162] ) ] spids: [-1 159] ) ] spids: [-1 170] ) ] spids: [73 173] ) redirects: [(Redir op_id:Redir_Less fd:-1 arg_word:{(cluster.txt)} spids:[175])] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id:BoolUnary_z child:{(DQ ($ VSub_Name "$ALLHOSTS"))}) ) terminator: <Op_Semi ";"> ) ] action: [(Sentence child:(C {(exit)}) terminator:<Op_Semi ";">)] spids: [-1 194] ) ] spids: [-1 199] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolUnary op_id: BoolUnary_z child: { (CommandSubPart command_list: (CommandList children:[(C {(which)} {(fping)})]) left_token: <Left_Backtick "`"> spids: [213 217] ) } ) ) terminator: <Op_Semi ";"> ) ] action: [ (ForEach iter_name: IP iter_words: [{($ VSub_Name "$ALLHOSTS")}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:UP) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(ping)} {(-c)} {(1)} {($ VSub_Name "$IP")}) (C {(grep)} {(ttl)}) (C {(cut)} {(-f4)} {(-d) (DQ (" "))}) (C {(cut)} {(-f1)} {(-d) (DQ (":"))}) ] negated: False ) ] ) left_token: <Left_Backtick "`"> spids: [242 277] ) } spids: [241] ) ] spids: [241] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (LogicalNot child: (BoolUnary op_id: BoolUnary_z child: {(DQ ($ VSub_Name "$UP"))} ) ) ) terminator: <Op_Semi ";"> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COUNT) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:COUNT) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [299 306] ) } spids: [298] ) ] spids: [298] ) (C {(echo)} {($ VSub_Name "$UP")} {($ VSub_Name "$ROLE")}) ] spids: [-1 295] ) ] spids: [-1 316] ) ] spids: [238 319] ) spids: [234 236] ) ] spids: [-1 222] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:UP) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (SimpleCommand words: [{(fping)} {(-aq)} {($ VSub_Name "$ALLHOSTS")}] redirects: [ (Redir op_id: Redir_Great fd: 2 arg_word: {(/dev/null)} spids: [337] ) ] ) ] ) left_token: <Left_Backtick "`"> spids: [330 340] ) } spids: [329] ) ] spids: [329] ) (ForEach iter_name: H iter_words: [{($ VSub_Name "$UP")}] do_arg_iter: False body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COUNT) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:COUNT) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [356 363] ) } spids: [355] ) ] spids: [355] ) (C {(echo)} {($ VSub_Name "$H")}) ] spids: [352 371] ) spids: [348 350] ) ] spids: [322 374] ) (C {(echo)} {(DQ ($ VSub_Name "$COUNT") (" hosts up"))}) ] spids: [-1 48] ) ] else_action: [(C {(echo)} {(DQ ("Warning : no cluster definition (cluster.txt) found"))})] spids: [384 393] ) ] )