(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH) op: assign_op.Equal rhs: {<'/etc'> <Id.Lit_Colon ':'> <'/bin'>} spids: [105] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RDCBOOT='> name:RDCBOOT) op: assign_op.Equal rhs: {(DQ <'/usr/sbin/sndrboot'>)} spids: [110] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'USAGE='> name:USAGE) op: assign_op.Equal rhs: {(DQ <'Usage: '> ($ Id.VSub_Number 0) <' {start|stop} [cluster_resource]'>)} spids: [115] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'SVCS='> name:SVCS) op: assign_op.Equal rhs: {<'/usr/bin/svcs'>} spids: [122] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DSCFG_DEPEND_NOCHK='> name:DSCFG_DEPEND_NOCHK) op: assign_op.Equal rhs: {(DQ <'/tmp/.dscfgadm_pid'>)} spids: [125] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'OS_MINOR='> name:OS_MINOR) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<'/usr/bin/uname'>} {<-r>}) (C {<'/usr/bin/cut'>} {<-d>} {(SQ <.>)} {<-f2>}) ] negated: F stderr_indices: [] ) right: <Id.Backtick_Right '`'> ) } spids: [130] ) ] redirects: [] ) (C {<.>} {<'/lib/svc/share/smf_include.sh'>}) (command.ShFunction name: do_smf_depends body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'times='> name:times) op: assign_op.Equal rhs: {<0>} spids: [174] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count) op: assign_op.Equal rhs: {<1>} spids: [178] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName OS_MINOR)} {<-ge>} {<11>} {<Id.Lit_RBracket ']'>} ) ] ) action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})] spids: [183 196] ) (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-f>} {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ForEach iter_names: [pid] iterable: (for_iter.Words words: [ { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<pgrep>} {<dscfgadm>}) right: <Id.Backtick_Right '`'> ) } ] ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<grep>} {<-c>} {($ Id.VSub_DollarName pid)} {($ Id.VSub_DollarName DSCFG_DEPEND_NOCHK)} ) right: <Id.Backtick_Right '`'> ) } {<-gt>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [236 259] ) ] else_action: [] redirects: [] ) ] ) redirects: [] ) ] spids: [204 215] ) (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<ps>} {<-ef>}) (C {<grep>} {<preremove>}) (C {<grep>} {<-c>} {<SUNWrdcu>}) ] negated: F stderr_indices: [] ) right: <Id.Backtick_Right '`'> ) } {<-gt>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [(command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>})] spids: [273 306] ) ] else_action: [] redirects: [] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName count)} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'count='> name:count) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (command.Simple words: [ {($ Id.VSub_DollarName SVCS)} {<-o>} {<STATE>} {<-D>} {($ Id.VSub_Number 1)} ] redirects: [ (redir op: <Id.Redir_DGreat '2>>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (C {<grep>} {(DQ <'^online'>)}) (C {<wc>} {<-l>}) ] negated: F stderr_indices: [] ) right: <Id.Backtick_Right '`'> ) } spids: [335] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName count)} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName times)} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<echo>} { (DQ <'Waiting for '> ($ Id.VSub_Number 1) <' dependents to be \'offline\''> ) } ) (command.Pipeline children: [ (command.Simple words: [ {($ Id.VSub_DollarName SVCS)} {<-D>} {($ Id.VSub_Number 1)} ] redirects: [ (redir op: <Id.Redir_DGreat '2>>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (C {<grep>} {(DQ <'^online'>)}) ] negated: F stderr_indices: [] ) ] spids: [392 405] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName times)} {<-eq>} {<60>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<echo>} { (DQ <'Error: Failed waiting for '> ($ Id.VSub_Number 1) <' dependents to be \'offline\''> ) } ) (command.Pipeline children: [ (command.Simple words: [ {($ Id.VSub_DollarName SVCS)} {<-D>} {($ Id.VSub_Number 1)} ] redirects: [ (redir op: <Id.Redir_DGreat '2>>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] more_env: [] do_fork: T ) (C {<grep>} {(DQ <'^online'>)}) ] negated: F stderr_indices: [] ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName SMF_EXIT_ERR_FATAL)} ) ] spids: [447 460] ) ] else_action: [] redirects: [] ) (C {<sleep>} {<5>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'times='> name:times) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName times)} {<Id.Lit_Other '+'>} {<1>} ) right: <Id.Backtick_Right '`'> ) } spids: [512] ) ] redirects: [] ) ] spids: [368 381] ) ] else_action: [] redirects: [] ) ] ) redirects: [] ) (command.ControlFlow token:<Id.ControlFlow_Return return> arg_word:{<0>}) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'CLINFO='> name:CLINFO) op: assign_op.Equal rhs: {<'/usr/sbin/clinfo'>} spids: [539] ) ] redirects: [] ) (command.ShFunction name: killproc body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pid='> name:pid) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<'/usr/bin/ps'>} {<-e>}) (C {<'/usr/bin/grep'>} {<-w>} {($ Id.VSub_Number 1)}) (C {<'/usr/bin/sed'>} {<-e>} {(SQ <'s/^ *//'>)} {<-e>} {(SQ <'s/ .*//'>)}) ] negated: F stderr_indices: [] ) right: <Id.Backtick_Right '`'> ) } spids: [553] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName pid))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ )} {<Id.Lit_RBracket ']'>} ) (C {<kill>} {($ Id.VSub_DollarName pid)}) ] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Case to_match: {(DQ ($ Id.VSub_Number 1))} arms: [ (case_arm pat_list: [{(SQ <start>)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COPT='> name:COPT) op: assign_op.Equal rhs: (rhs_word.Empty) spids: [629] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-x>} {(${ Id.VSub_Name RDCBOOT)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands:[(C {(${ Id.VSub_Name CLINFO)})]) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number 2))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ )} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {(${ Id.VSub_Name RDCBOOT)} {<-r>} {<-C>} {($ Id.VSub_Number 2)}) ] spids: [659 676] ) ] else_action: [ (C {(${ Id.VSub_Name RDCBOOT)} {<-C>} {<post-patch-setids>} {<-r>} {<-s>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COPT='> name:COPT) op: assign_op.Equal rhs: {(DQ <'-C -'>)} spids: [711] ) ] redirects: [] ) (C {(${ Id.VSub_Name RDCBOOT)} {(${ Id.VSub_Name COPT)} {<-r>}) ] redirects: [] ) ] spids: [649 656] ) ] else_action: [(C {(${ Id.VSub_Name RDCBOOT)} {<-r>})] redirects: [] ) ] spids: [633 646] ) ] else_action: [] redirects: [] ) ] spids: [623 626 751 -1] ) (case_arm pat_list: [{(SQ <stop>)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COPT='> name:COPT) op: assign_op.Equal rhs: (rhs_word.Empty) spids: [760] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-r>} {<'/dev/rdc'>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RDCBOOT='> name:RDCBOOT) op: assign_op.Equal rhs: {<'/usr/bin/true'>} spids: [780] ) ] redirects: [] ) ] spids: [764 777] ) ] else_action: [] redirects: [] ) (C {<do_smf_depends>} {(DQ <'system/nws_rdc'>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-x>} {(${ Id.VSub_Name RDCBOOT)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands:[(C {(${ Id.VSub_Name CLINFO)})]) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_Number 2))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ )} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {(${ Id.VSub_Name RDCBOOT)} {<-s>} {<-C>} {($ Id.VSub_Number 2)}) ] spids: [823 840] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'COPT='> name:COPT) op: assign_op.Equal rhs: {(DQ <'-C -'>)} spids: [857] ) ] redirects: [] ) (C {(${ Id.VSub_Name RDCBOOT)} {(${ Id.VSub_Name COPT)} {<-s>}) (C {<echo>} {(DQ <'killing SNDR daemons'>)}) (C {<killproc>} {<sndrd>}) (C {<killproc>} {<sndrsync>}) ] redirects: [] ) ] spids: [813 820] ) ] else_action: [ (C {(${ Id.VSub_Name RDCBOOT)} {<-s>}) (C {<echo>} {(DQ <'killing SNDR daemons'>)}) (C {<killproc>} {<sndrd>}) (C {<killproc>} {<sndrsync>}) ] redirects: [] ) ] spids: [797 810] ) ] else_action: [ (C {<echo>} {(DQ <'killing SNDR daemons'>)}) (C {<killproc>} {<sndrd>}) (C {<killproc>} {<sndrsync>}) ] redirects: [] ) ] spids: [754 757 960 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<echo>} {($ Id.VSub_DollarName USAGE)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [963 964 977 -1] ) ] redirects: [] ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName SMF_EXIT_OK)} ) ] )