(command.CommandList
  children: [
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(Id.Lit_LBracket '[')} {(-x)} {(/sbin/resolvconf)} {(Id.Lit_RBracket ']')})
        (command.ControlFlow
          token: (Token id:Id.ControlFlow_Exit val:exit span_id:81)
          arg_word: {(0)}
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:PATH)
          op: assign_op.Equal
          rhs: {(/sbin) (Id.Lit_Other ':') (/bin)}
          spids: [86]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:RUN_DIR)
          op: assign_op.Equal
          rhs: {(/run/resolvconf)}
          spids: [91]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:ENABLE_UPDATES_FLAGFILE)
          op: assign_op.Equal
          rhs: {(DQ (${ Id.VSub_Name RUN_DIR) (/enable-updates))}
          spids: [94]
        )
      ]
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:POSTPONED_UPDATE_FLAGFILE)
          op: assign_op.Equal
          rhs: {(DQ (${ Id.VSub_Name RUN_DIR) (/postponed-update))}
          spids: [102]
        )
      ]
    )
    (C {(.)} {(/lib/lsb/init-functions)})
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number '$1'))}
      arms: [
        (case_arm
          pat_list: [{(start)} {(restart)} {(force-reload)}]
          action: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(init_is_upstart)})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:140)
                  arg_word: {(1)}
                )
              ]
            )
          ]
          spids: [128 133 145 -1]
        )
        (case_arm
          pat_list: [{(stop)}]
          action: [
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (C {(init_is_upstart)})
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Exit val:exit span_id:156)
                  arg_word: {(0)}
                )
              ]
            )
          ]
          spids: [148 149 161 -1]
        )
      ]
    )
    (command.ShFunction
      name: log_action_end_msg_and_exit
      body: 
        (command.BraceGroup
          children: [
            (C {(log_action_end_msg)} {(DQ ($ Id.VSub_Number '$1'))} 
              {
                (braced_var_sub
                  token: (Token id:Id.VSub_Number val:2 span_id:186)
                  suffix_op: 
                    (suffix_op.Unary
                      op_id: Id.VTest_ColonPlus
                      arg_word: {(DQ ($ Id.VSub_Number '$2'))}
                    )
                )
              }
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:194)
              arg_word: {($ Id.VSub_Number '$1')}
            )
          ]
        )
    )
    (command.ShFunction
      name: create_runtime_directories
      body: 
        (command.BraceGroup
          children: [
            (C {(umask)} {(022)})
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-d)} 
                          {(DQ ($ Id.VSub_DollarName '$RUN_DIR'))} {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:227)
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {(Id.Lit_LBracket '[')} {(-L)} {(DQ ($ Id.VSub_DollarName '$RUN_DIR'))} 
                          {(Id.Lit_RBracket ']')}
                        )
                        (C {(log_action_end_msg_and_exit)} {(1)} 
                          {
                            (DQ ($ Id.VSub_DollarName '$RUN_DIR') 
                              (' is neither a directory nor a symbolic link')
                            )
                          }
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (command.BraceGroup
                          children: [
                            (command.Sentence
                              child: 
                                (command.AndOr
                                  ops: [Id.Op_DAmp]
                                  children: [
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:RUN_CANONICALDIR)
                                          op: assign_op.Equal
                                          rhs: 
                                            {
                                              (DQ 
                                                (command_sub
                                                  left_token: 
                                                    (Token
                                                      id: Id.Left_DollarParen
                                                      val: '$('
                                                      span_id: 262
                                                    )
                                                  command_list: 
                                                    (command.CommandList
                                                      children: [
                                                        (C {(readlink)} {(-f)} 
                                                          {(DQ ($ Id.VSub_DollarName '$RUN_DIR'))}
                                                        )
                                                      ]
                                                    )
                                                )
                                              )
                                            }
                                          spids: [260]
                                        )
                                      ]
                                    )
                                    (C {(Id.Lit_LBracket '[')} 
                                      {(DQ ($ Id.VSub_DollarName '$RUN_CANONICALDIR'))} {(Id.Lit_RBracket ']')}
                                    )
                                  ]
                                )
                              terminator: (Token id:Id.Op_Semi val:';' span_id:283)
                            )
                          ]
                        )
                        (C {(log_action_end_msg_and_exit)} {(1)} 
                          {(DQ ('Canonical path of the run directory could not be determined'))}
                        )
                      ]
                    )
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {(mkdir)} {(DQ ($ Id.VSub_DollarName '$RUN_CANONICALDIR'))})
                        (C {(log_action_end_msg_and_exit)} {(1)} 
                          {
                            (DQ ('Error creating directory ') 
                              ($ Id.VSub_DollarName '$RUN_CANONICALDIR')
                            )
                          }
                        )
                      ]
                    )
                  ]
                  spids: [213 229]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: 
                        (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-d)} 
                          {(DQ (${ Id.VSub_Name RUN_DIR) (/interface))} {(Id.Lit_RBracket ']')}
                        )
                      terminator: (Token id:Id.Op_Semi val:';' span_id:344)
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Id.Op_DPipe]
                      children: [
                        (C {(mkdir)} {(DQ (${ Id.VSub_Name RUN_DIR) (/interface))})
                        (C {(log_action_end_msg_and_exit)} {(1)} 
                          {(DQ ('Error creating directory ') (${ Id.VSub_Name RUN_DIR) (/interface))}
                        )
                      ]
                    )
                  ]
                  spids: [327 346]
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:380)
            )
          ]
        )
    )
    (command.ShFunction
      name: wipe_runtime_directories
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(Id.Lit_LBracket '[')} {(-d)} {(DQ ($ Id.VSub_DollarName '$RUN_DIR'))} 
                  {(Id.Lit_RBracket ']')}
                )
                (command.ControlFlow
                  token: (Token id:Id.ControlFlow_Return val:return span_id:408)
                )
              ]
            )
            (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$RUN_DIR')) (/resolv.conf)})
            (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$ENABLE_UPDATES_FLAGFILE'))})
            (C {(rm)} {(-f)} {(DQ ($ Id.VSub_DollarName '$POSTPONED_UPDATE_FLAGFILE'))})
            (C {(rm)} {(-rf)} {(DQ (${ Id.VSub_Name RUN_DIR) ('/interface/*'))})
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Return val:return span_id:451)
            )
          ]
        )
    )
    (command.Case
      to_match: {(DQ ($ Id.VSub_Number '$1'))}
      arms: [
        (case_arm
          pat_list: [{(start)}]
          action: [
            (C {(log_action_begin_msg)} {(DQ ('Setting up resolvconf'))})
            (C {(wipe_runtime_directories)})
            (C {(create_runtime_directories)})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (command.Simple
                  words: [{(Id.Lit_Other ':')}]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:503)
                      fd: -1
                      arg_word: {(DQ ($ Id.VSub_DollarName '$POSTPONED_UPDATE_FLAGFILE'))}
                    )
                  ]
                )
                (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed requesting update'))})
              ]
            )
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(resolvconf)} {(--enable-updates)})
                (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to enable updates'))})
              ]
            )
            (C {(log_action_end_msg_and_exit)} {(0)})
          ]
          spids: [465 466 544 -1]
        )
        (case_arm
          pat_list: [{(stop)}]
          action: [
            (C {(log_action_begin_msg)} {(DQ ('Stopping resolvconf'))})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(resolvconf)} {(--disable-updates)})
                (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to disable updates'))})
              ]
            )
            (C {(log_action_end_msg_and_exit)} {(0)})
          ]
          spids: [547 548 582 -1]
        )
        (case_arm
          pat_list: [{(restart)}]
          action: [
            (C {(log_action_begin_msg)} {(DQ ('Restarting resolvconf'))})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(resolvconf)} {(--enable-updates)})
                (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to enable updates'))})
              ]
            )
            (C {(log_action_end_msg_and_exit)} {(0)})
          ]
          spids: [585 586 616 -1]
        )
        (case_arm
          pat_list: [{(reload)} {(force-reload)}]
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(resolvconf)} {(-u)})
                (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to update'))})
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:640)
              arg_word: {(0)}
            )
          ]
          spids: [619 622 645 -1]
        )
        (case_arm
          pat_list: [{(enable-updates)}]
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(resolvconf)} {(--enable-updates)})
                (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to enable updates'))})
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:667)
              arg_word: {(0)}
            )
          ]
          spids: [648 649 672 -1]
        )
        (case_arm
          pat_list: [{(disable-updates)}]
          action: [
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {(resolvconf)} {(--disable-updates)})
                (C {(log_action_end_msg_and_exit)} {(1)} {(DQ ('failed to disable updates'))})
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:694)
              arg_word: {(0)}
            )
          ]
          spids: [675 676 699 -1]
        )
        (case_arm
          pat_list: [{(status)}]
          action: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Sentence
                      child: (C {(resolvconf)} {(--updates-are-enabled)})
                      terminator: (Token id:Id.Op_Semi val:';' span_id:712)
                    )
                  ]
                  action: [(C {(log_success_msg)} {(DQ ('resolvconf updates are enabled'))})]
                  spids: [706 714]
                )
              ]
              else_action: [(C {(log_failure_msg)} {(DQ ('resolvconf updates are disabled'))})]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:737)
              arg_word: {(0)}
            )
          ]
          spids: [702 703 742 -1]
        )
        (case_arm
          pat_list: [{(Id.Lit_Star '*')}]
          action: [
            (command.Simple
              words: [
                {(echo)}
                {
                  (DQ 
                    (
'Usage: /etc/init.d/resolvconf {start|stop|restart|reload|force-reload|enable-updates|disable-updates|status}'
                    )
                  )
                }
              ]
              redirects: [
                (redir.Redir
                  op: (Token id:Id.Redir_GreatAnd val:'>&' span_id:755)
                  fd: -1
                  arg_word: {(2)}
                )
              ]
            )
            (command.ControlFlow
              token: (Token id:Id.ControlFlow_Exit val:exit span_id:759)
              arg_word: {(3)}
            )
          ]
          spids: [745 746 764 -1]
        )
      ]
    )
    (command.ControlFlow token:(Token id:Id.ControlFlow_Exit val:exit span_id:772) arg_word:{(99)})
  ]
)