(command.CommandList
  children: [
    (command.Sentence
      child: 
        (command.ShFunction
          name: create_desktop_nettray
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NIC)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Number 1))}
                      spids: [108]
                    )
                  ]
                )
                (command.Simple
                  words: [
                    {<echo>}
                    {
                      (DQ <'#!/usr/bin/env xdg-open\n'> <'[Desktop Entry]\n'> 
                        <'Exec=/usr/local/kde4/bin/pc-nettray '> (${ Id.VSub_Name NIC) <'\n'> <'Icon=network\n'> <'StartupNotify=false\n'> <'Type=Application'>
                      )
                    }
                  ]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: 
                        {(${ Id.VSub_Name FSMNT) <'/usr/share/skel/.kde4/Autostart/tray-'> 
                          (${ Id.VSub_Name NIC) <.desktop>
                        }
                    )
                  ]
                  do_fork: T
                )
                (C {<chmod>} {<744>} 
                  {(${ Id.VSub_Name FSMNT) <'/usr/share/skel/.kde4/Autostart/tray-'> 
                    (${ Id.VSub_Name NIC) <.desktop>
                  }
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: check_is_wifi
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NIC)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [171]
                    )
                  ]
                )
                (command.Pipeline
                  children: [
                    (C {<ifconfig>} {(${ Id.VSub_Name NIC)})
                    (command.Simple
                      words: [{<grep>} {<-q>} {(DQ <802.11>)}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '2>'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  negated: F
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [197 210]
                    )
                  ]
                  else_action: [
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: get_first_wired_nic
          body: 
            (BraceGroup
              children: [
                (command.Simple
                  words: [{<rm>} {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                    (redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  words: [{(${ Id.VSub_Name QUERYDIR) <'/detect-nics.sh'>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}
                    )
                  ]
                  do_fork: T
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-e>} 
                              {(DQ (${ Id.VSub_Name TMPDIR) <'/.niclist'>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: (condition.Shell commands:[(C {<read>} {<line>})])
                          body: 
                            (command.DoGroup
                              children: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:NIC)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (command_sub
                                              left_token: <Id.Left_Backtick '`'>
                                              child: 
                                                (command.Pipeline
                                                  children: [
                                                    (C {<echo>} {($ Id.VSub_DollarName '$line')})
                                                    (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<1>})
                                                  ]
                                                  negated: F
                                                )
                                            )
                                          )
                                        }
                                      spids: [303]
                                    )
                                  ]
                                )
                                (C {<check_is_wifi>} {(${ Id.VSub_Name NIC)})
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} 
                                              {<0>} {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                        )
                                      action: [
                                        (C {<export>} 
                                          {<Id.Lit_VarLike 'VAL='> (DQ (${ Id.VSub_Name NIC))}
                                        )
                                        (command.ControlFlow
                                          token: <Id.ControlFlow_Return return>
                                        )
                                      ]
                                      spids: [336 349]
                                    )
                                  ]
                                )
                              ]
                            )
                          redirects: [
                            (redir
                              op: <Id.Redir_Less '<'>
                              loc: (redir_loc.Fd fd:0)
                              arg: {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}
                            )
                          ]
                        )
                      ]
                      spids: [274 290]
                    )
                  ]
                )
                (C {<export>} {<Id.Lit_VarLike 'VAL='> (DQ )})
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: enable_dhcp_all
          body: 
            (BraceGroup
              children: [
                (command.Simple
                  words: [{<rm>} {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                    (redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  words: [{(${ Id.VSub_Name QUERYDIR) <'/detect-nics.sh'>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}
                    )
                  ]
                  do_fork: T
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-e>} 
                              {(DQ (${ Id.VSub_Name TMPDIR) <'/.niclist'>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.Simple
                          words: [{<echo>} {(DQ <'# Auto-Enabled NICs from pc-sysinstall'>)}]
                          redirects: [
                            (redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:WLANCOUNT)
                              op: assign_op.Equal
                              rhs: {(DQ <0>)}
                              spids: [469]
                            )
                          ]
                        )
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: (condition.Shell commands:[(C {<read>} {<line>})])
                          body: 
                            (command.DoGroup
                              children: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:NIC)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (command_sub
                                              left_token: <Id.Left_Backtick '`'>
                                              child: 
                                                (command.Pipeline
                                                  children: [
                                                    (C {<echo>} {($ Id.VSub_DollarName '$line')})
                                                    (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<1>})
                                                  ]
                                                  negated: F
                                                )
                                            )
                                          )
                                        }
                                      spids: [485]
                                    )
                                  ]
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:DESC)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (command_sub
                                              left_token: <Id.Left_Backtick '`'>
                                              child: 
                                                (command.Pipeline
                                                  children: [
                                                    (C {<echo>} {($ Id.VSub_DollarName '$line')})
                                                    (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<2>})
                                                  ]
                                                  negated: F
                                                )
                                            )
                                          )
                                        }
                                      spids: [511]
                                    )
                                  ]
                                )
                                (C {<echo_log>} 
                                  {
                                    (DQ <'Setting '> ($ Id.VSub_DollarName '$NIC') 
                                      <' to DHCP on the system.'>
                                    )
                                  }
                                )
                                (C {<check_is_wifi>} {(${ Id.VSub_Name NIC)})
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} 
                                              {<0>} {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                        )
                                      action: [
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:WLAN)
                                              op: assign_op.Equal
                                              rhs: {(DQ <wlan> (${ Id.VSub_Name WLANCOUNT))}
                                              spids: [573]
                                            )
                                          ]
                                        )
                                        (command.Pipeline
                                          children: [
                                            (C {<cat>} {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>})
                                            (C {<grep>} {<-q>} 
                                              {(DQ <wlans_> (${ Id.VSub_Name NIC) <'='>)}
                                            )
                                          ]
                                          negated: F
                                        )
                                        (command.If
                                          arms: [
                                            (if_arm
                                              cond: 
                                                (condition.Shell
                                                  commands: [
                                                    (command.Sentence
                                                      child: 
                                                        (C {<Id.Lit_LBracket '['>} 
                                                          {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>}
                                                        )
                                                      terminator: <Id.Op_Semi _>
                                                    )
                                                  ]
                                                )
                                              action: [
                                                (command.Simple
                                                  words: [
                                                    {<echo>}
                                                    {
                                                      (DQ <wlans_> (${ Id.VSub_Name NIC) <'='> 
                                                        (word_part.EscapedLiteral
                                                          token: <Id.Lit_EscapedChar '\\"'>
                                                        ) (${ Id.VSub_Name WLAN) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                                                      )
                                                    }
                                                  ]
                                                  redirects: [
                                                    (redir
                                                      op: <Id.Redir_DGreat '>>'>
                                                      loc: (redir_loc.Fd fd:1)
                                                      arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                                                    )
                                                  ]
                                                  do_fork: T
                                                )
                                              ]
                                              spids: [604 618]
                                            )
                                          ]
                                        )
                                        (command.Simple
                                          words: [
                                            {<echo>}
                                            {
                                              (DQ <ifconfig_> (${ Id.VSub_Name WLAN) <'='> 
                                                (word_part.EscapedLiteral
                                                  token: <Id.Lit_EscapedChar '\\"'>
                                                ) <DHCP> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                                              )
                                            }
                                          ]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_DGreat '>>'>
                                              loc: (redir_loc.Fd fd:1)
                                              arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                                            )
                                          ]
                                          do_fork: T
                                        )
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:CNIC)
                                              op: assign_op.Equal
                                              rhs: {(DQ (${ Id.VSub_Name WLAN))}
                                              spids: [666]
                                            )
                                          ]
                                        )
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:WLANCOUNT)
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (word_part.ArithSub
                                                    anode: 
                                                      (arith_expr.Binary
                                                        op_id: Id.Arith_Plus
                                                        left: <Id.Lit_ArithVarLike WLANCOUNT>
                                                        right: {<Id.Lit_Digits 1>}
                                                      )
                                                  )
                                                }
                                              spids: [674]
                                            )
                                          ]
                                        )
                                      ]
                                      spids: [553 566]
                                    )
                                  ]
                                  else_action: [
                                    (command.Simple
                                      words: [
                                        {<echo>}
                                        {
                                          (DQ <ifconfig_> (${ Id.VSub_Name NIC) <'='> 
                                            (word_part.EscapedLiteral
                                              token: <Id.Lit_EscapedChar '\\"'>
                                            ) <DHCP> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir
                                          op: <Id.Redir_DGreat '>>'>
                                          loc: (redir_loc.Fd fd:1)
                                          arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                                        )
                                      ]
                                      do_fork: T
                                    )
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:CNIC)
                                          op: assign_op.Equal
                                          rhs: {(DQ (${ Id.VSub_Name NIC))}
                                          spids: [706]
                                        )
                                      ]
                                    )
                                  ]
                                )
                              ]
                            )
                          redirects: [
                            (redir
                              op: <Id.Redir_Less '<'>
                              loc: (redir_loc.Fd fd:0)
                              arg: {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}
                            )
                          ]
                        )
                      ]
                      spids: [437 453]
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: save_auto_dhcp
          body: (BraceGroup children:[(C {<enable_dhcp_all>})])
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: enable_slaac_all
          body: 
            (BraceGroup
              children: [
                (command.Simple
                  words: [{<rm>} {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/dev/null'>}
                    )
                    (redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<'/dev/null'>}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  words: [{(${ Id.VSub_Name QUERYDIR) <'/detect-nics.sh'>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}
                    )
                  ]
                  do_fork: T
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-e>} 
                              {(DQ (${ Id.VSub_Name TMPDIR) <'/.niclist'>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.Simple
                          words: [{<echo>} {(DQ <'# Auto-Enabled NICs from pc-sysinstall'>)}]
                          redirects: [
                            (redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:WLANCOUNT)
                              op: assign_op.Equal
                              rhs: {(DQ <0>)}
                              spids: [826]
                            )
                          ]
                        )
                        (command.WhileUntil
                          keyword: <Id.KW_While while>
                          cond: (condition.Shell commands:[(C {<read>} {<line>})])
                          body: 
                            (command.DoGroup
                              children: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:NIC)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (command_sub
                                              left_token: <Id.Left_Backtick '`'>
                                              child: 
                                                (command.Pipeline
                                                  children: [
                                                    (C {<echo>} {($ Id.VSub_DollarName '$line')})
                                                    (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<1>})
                                                  ]
                                                  negated: F
                                                )
                                            )
                                          )
                                        }
                                      spids: [842]
                                    )
                                  ]
                                )
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:DESC)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (command_sub
                                              left_token: <Id.Left_Backtick '`'>
                                              child: 
                                                (command.Pipeline
                                                  children: [
                                                    (C {<echo>} {($ Id.VSub_DollarName '$line')})
                                                    (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<2>})
                                                  ]
                                                  negated: F
                                                )
                                            )
                                          )
                                        }
                                      spids: [868]
                                    )
                                  ]
                                )
                                (C {<echo_log>} 
                                  {
                                    (DQ <'Setting '> ($ Id.VSub_DollarName '$NIC') 
                                      <' to accepting RAs on the system.'>
                                    )
                                  }
                                )
                                (C {<check_is_wifi>} {(${ Id.VSub_Name NIC)})
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} 
                                              {<0>} {<Id.Lit_RBracket ']'>}
                                            )
                                          ]
                                        )
                                      action: [
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:WLAN)
                                              op: assign_op.Equal
                                              rhs: {(DQ <wlan> (${ Id.VSub_Name WLANCOUNT))}
                                              spids: [938]
                                            )
                                          ]
                                        )
                                        (command.Pipeline
                                          children: [
                                            (C {<cat>} {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>})
                                            (C {<grep>} {<-q>} 
                                              {(DQ <wlans_> (${ Id.VSub_Name NIC) <'='>)}
                                            )
                                          ]
                                          negated: F
                                        )
                                        (command.If
                                          arms: [
                                            (if_arm
                                              cond: 
                                                (condition.Shell
                                                  commands: [
                                                    (command.Sentence
                                                      child: 
                                                        (C {<Id.Lit_LBracket '['>} 
                                                          {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>}
                                                        )
                                                      terminator: <Id.Op_Semi _>
                                                    )
                                                  ]
                                                )
                                              action: [
                                                (command.Simple
                                                  words: [
                                                    {<echo>}
                                                    {
                                                      (DQ <wlans_> (${ Id.VSub_Name NIC) <'='> 
                                                        (word_part.EscapedLiteral
                                                          token: <Id.Lit_EscapedChar '\\"'>
                                                        ) (${ Id.VSub_Name WLAN) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                                                      )
                                                    }
                                                  ]
                                                  redirects: [
                                                    (redir
                                                      op: <Id.Redir_DGreat '>>'>
                                                      loc: (redir_loc.Fd fd:1)
                                                      arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                                                    )
                                                  ]
                                                  do_fork: T
                                                )
                                              ]
                                              spids: [969 983]
                                            )
                                          ]
                                        )
                                        (command.Simple
                                          words: [
                                            {<echo>}
                                            {
                                              (DQ <ifconfig_> (${ Id.VSub_Name WLAN) <'_ipv6='> 
                                                (word_part.EscapedLiteral
                                                  token: <Id.Lit_EscapedChar '\\"'>
                                                ) <'inet6 accept_rtadv'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                                              )
                                            }
                                          ]
                                          redirects: [
                                            (redir
                                              op: <Id.Redir_DGreat '>>'>
                                              loc: (redir_loc.Fd fd:1)
                                              arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                                            )
                                          ]
                                          do_fork: T
                                        )
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:CNIC)
                                              op: assign_op.Equal
                                              rhs: {(DQ (${ Id.VSub_Name WLAN))}
                                              spids: [1035]
                                            )
                                          ]
                                        )
                                        (command.ShAssignment
                                          pairs: [
                                            (assign_pair
                                              lhs: (sh_lhs_expr.Name name:WLANCOUNT)
                                              op: assign_op.Equal
                                              rhs: 
                                                {
                                                  (word_part.ArithSub
                                                    anode: 
                                                      (arith_expr.Binary
                                                        op_id: Id.Arith_Plus
                                                        left: <Id.Lit_ArithVarLike WLANCOUNT>
                                                        right: {<Id.Lit_Digits 1>}
                                                      )
                                                  )
                                                }
                                              spids: [1043]
                                            )
                                          ]
                                        )
                                      ]
                                      spids: [910 923]
                                    )
                                  ]
                                  else_action: [
                                    (command.Simple
                                      words: [
                                        {<echo>}
                                        {
                                          (DQ <ifconfig_> (${ Id.VSub_Name NIC) <'_ipv6='> 
                                            (word_part.EscapedLiteral
                                              token: <Id.Lit_EscapedChar '\\"'>
                                            ) <'inet6 accept_rtadv'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir
                                          op: <Id.Redir_DGreat '>>'>
                                          loc: (redir_loc.Fd fd:1)
                                          arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                                        )
                                      ]
                                      do_fork: T
                                    )
                                    (command.ShAssignment
                                      pairs: [
                                        (assign_pair
                                          lhs: (sh_lhs_expr.Name name:CNIC)
                                          op: assign_op.Equal
                                          rhs: {(DQ (${ Id.VSub_Name NIC))}
                                          spids: [1079]
                                        )
                                      ]
                                    )
                                  ]
                                )
                              ]
                            )
                          redirects: [
                            (redir
                              op: <Id.Redir_Less '<'>
                              loc: (redir_loc.Fd fd:0)
                              arg: {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}
                            )
                          ]
                        )
                      ]
                      spids: [794 810]
                    )
                  ]
                )
                (command.Simple
                  words: [{<Id.Lit_Colon ':'>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name FSMNT) <'/etc/resolv.conf'>}
                    )
                  ]
                  do_fork: T
                )
                (C {<get_value_from_cfg>} {<netSaveIPv6NameServer>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NAMESERVER)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [1130]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NAMESERVER))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.Simple
                          words: [{<echo>} {(DQ <'nameserver '> (${ Id.VSub_Name NAMESERVER))}]
                          redirects: [
                            (redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {(${ Id.VSub_Name FSMNT) <'/etc/resolv.conf'>}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      spids: [1138 1153]
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: save_auto_slaac
          body: (BraceGroup children:[(C {<enable_slaac_all>})])
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: save_manual_nic
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NIC)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [1211]
                    )
                  ]
                )
                (C {<get_value_from_cfg>} {<netSaveIP_> (${ Id.VSub_Name NIC)})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NETIP)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [1226]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$NETIP'))} 
                              {<Id.Lit_Equals '='>} {(DQ <DHCP>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<echo_log>} 
                          {
                            (DQ <'Setting '> ($ Id.VSub_DollarName '$NIC') <' to DHCP on the system.'>)
                          }
                        )
                        (command.Simple
                          words: [
                            {<echo>}
                            {
                              (DQ <ifconfig_> (${ Id.VSub_Name NIC) <'='> 
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\"'>
                                ) <DHCP> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                              )
                            }
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                            )
                          ]
                          do_fork: T
                        )
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [1236 1253]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:IFARGS)
                      op: assign_op.Equal
                      rhs: {(DQ )}
                      spids: [1298]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:IF6ARGS)
                      op: assign_op.Equal
                      rhs: {(DQ )}
                      spids: [1303]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NETIP))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:IFARGS)
                              op: assign_op.Equal
                              rhs: {(DQ <'inet '> (${ Id.VSub_Name NETIP))}
                              spids: [1331]
                            )
                          ]
                        )
                        (C {<get_value_from_cfg>} {<netSaveMask_> (${ Id.VSub_Name NIC)})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:NETMASK)
                              op: assign_op.Equal
                              rhs: {(DQ (${ Id.VSub_Name VAL))}
                              spids: [1353]
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NETMASK))} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                )
                              action: [
                                (command.ShAssignment
                                  pairs: [
                                    (assign_pair
                                      lhs: (sh_lhs_expr.Name name:IFARGS)
                                      op: assign_op.Equal
                                      rhs: 
                                        {
                                          (DQ (${ Id.VSub_Name IFARGS) <' netmask '> 
                                            (${ Id.VSub_Name NETMASK)
                                          )
                                        }
                                      spids: [1379]
                                    )
                                  ]
                                )
                              ]
                              spids: [1361 1376]
                            )
                          ]
                        )
                      ]
                      spids: [1313 1328]
                    )
                  ]
                )
                (C {<get_value_from_cfg>} {<netSaveIPv6_> (${ Id.VSub_Name NIC)})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NETIP6)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [1406]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NETIP6))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:IF6ARGS)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (command_sub
                                    left_token: <Id.Left_Backtick '`'>
                                    child: 
                                      (command.Pipeline
                                        children: [
                                          (C {<echo>} {(DQ (${ Id.VSub_Name NETIP6))})
                                          (C {<awk>} 
                                            {
                                              (SQ <'{ if ("^inet6 ") { print $0; } else\n'> 
                                                <'      { printf "inet6 %s", $0; } }'>
                                              )
                                            }
                                          )
                                        ]
                                        negated: F
                                      )
                                  )
                                }
                              spids: [1436]
                            )
                          ]
                        )
                      ]
                      spids: [1414 1429]
                    )
                  ]
                )
                (command.Simple
                  words: [{<echo>} {(DQ <'# Auto-Enabled NICs from pc-sysinstall'>)}]
                  redirects: [
                    (redir
                      op: <Id.Redir_DGreat '>>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                    )
                  ]
                  do_fork: T
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name IFARGS))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.Simple
                          words: [
                            {<echo>}
                            {
                              (DQ <ifconfig_> (${ Id.VSub_Name NIC) <'='> 
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\"'>
                                ) (${ Id.VSub_Name IFARGS) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                              )
                            }
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      spids: [1477 1492]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name IF6ARGS))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.Simple
                          words: [
                            {<echo>}
                            {
                              (DQ <ifconfig_> (${ Id.VSub_Name NIC) <'_ipv6='> 
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\"'>
                                ) (${ Id.VSub_Name IF6ARGS) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                              )
                            }
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      spids: [1520 1535]
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: save_manual_router
          body: 
            (BraceGroup
              children: [
                (C {<get_value_from_cfg>} {<netSaveDefaultRouter>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NETROUTE)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [1587]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NETROUTE))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.Simple
                          words: [
                            {<echo>}
                            {
                              (DQ <'defaultrouter='> 
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\"'>
                                ) (${ Id.VSub_Name NETROUTE) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                              )
                            }
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      spids: [1595 1610]
                    )
                  ]
                )
                (C {<get_value_from_cfg>} {<netSaveIPv6DefaultRouter>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NETROUTE)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [1639]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NETROUTE))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.Simple
                          words: [
                            {<echo>}
                            {
                              (DQ <'ipv6_defaultrouter='> 
                                (word_part.EscapedLiteral
                                  token: <Id.Lit_EscapedChar '\\"'>
                                ) (${ Id.VSub_Name NETROUTE) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>)
                              )
                            }
                          ]
                          redirects: [
                            (redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {(${ Id.VSub_Name FSMNT) <'/etc/rc.conf'>}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      spids: [1647 1662]
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: save_manual_nameserver
          body: 
            (BraceGroup
              children: [
                (command.Simple
                  words: [{<Id.Lit_Colon ':'>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name FSMNT) <'/etc/resolv.conf'>}
                    )
                  ]
                  do_fork: T
                )
                (C {<get_value_from_cfg_with_spaces>} {<netSaveNameServer>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NAMESERVERLIST)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [1716]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                              {(DQ (${ Id.VSub_Name NAMESERVERLIST))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.ForEach
                          iter_name: NAMESERVER
                          iter_words: [{(${ Id.VSub_Name NAMESERVERLIST)}]
                          do_arg_iter: F
                          body: 
                            (command.DoGroup
                              children: [
                                (command.Simple
                                  words: [{<echo>} {(DQ <'nameserver '> (${ Id.VSub_Name NAMESERVER))}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_DGreat '>>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {(${ Id.VSub_Name FSMNT) <'/etc/resolv.conf'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                            )
                        )
                      ]
                      spids: [1724 1741]
                    )
                  ]
                )
                (C {<get_value_from_cfg_with_spaces>} {<netSaveIPv6NameServer>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NAMESERVERLIST)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [1786]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} 
                              {(DQ (${ Id.VSub_Name NAMESERVERLIST))} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.ForEach
                          iter_name: NAMESERVER
                          iter_words: [{(${ Id.VSub_Name NAMESERVERLIST)}]
                          do_arg_iter: F
                          body: 
                            (command.DoGroup
                              children: [
                                (command.Simple
                                  words: [{<echo>} {(DQ <'nameserver '> (${ Id.VSub_Name NAMESERVER))}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_DGreat '>>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {(${ Id.VSub_Name FSMNT) <'/etc/resolv.conf'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                              ]
                            )
                        )
                      ]
                      spids: [1794 1811]
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: is_nic_active
          body: 
            (BraceGroup
              children: [
                (command.Pipeline
                  children: [
                    (C {<ifconfig>} {(${ Id.VSub_Number 1)})
                    (command.Simple
                      words: [{<grep>} {<-q>} {(DQ <'status: active'>)}]
                      redirects: [
                        (redir
                          op: <Id.Redir_Great '2>'>
                          loc: (redir_loc.Fd fd:2)
                          arg: {<'/dev/null'>}
                        )
                      ]
                      do_fork: T
                    )
                  ]
                  negated: F
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Sentence
                              child: 
                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} 
                                  {<Id.Lit_RBracket ']'>}
                                )
                              terminator: <Id.Op_Semi _>
                            )
                          ]
                        )
                      action: [
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [1884 1898]
                    )
                  ]
                  else_action: [
                    (command.ControlFlow
                      token: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: enable_auto_dhcp
          body: 
            (BraceGroup
              children: [
                (command.Simple
                  words: [{(${ Id.VSub_Name QUERYDIR) <'/detect-nics.sh'>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}
                    )
                  ]
                  do_fork: T
                )
                (command.WhileUntil
                  keyword: <Id.KW_While while>
                  cond: (condition.Shell commands:[(C {<read>} {<line>})])
                  body: 
                    (command.DoGroup
                      children: [
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:NIC)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (command_sub
                                      left_token: <Id.Left_Backtick '`'>
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<echo>} {($ Id.VSub_DollarName '$line')})
                                            (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<1>})
                                          ]
                                          negated: F
                                        )
                                    )
                                  )
                                }
                              spids: [1961]
                            )
                          ]
                        )
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:DESC)
                              op: assign_op.Equal
                              rhs: 
                                {
                                  (DQ 
                                    (command_sub
                                      left_token: <Id.Left_Backtick '`'>
                                      child: 
                                        (command.Pipeline
                                          children: [
                                            (C {<echo>} {($ Id.VSub_DollarName '$line')})
                                            (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<2>})
                                          ]
                                          negated: F
                                        )
                                    )
                                  )
                                }
                              spids: [1987]
                            )
                          ]
                        )
                        (C {<is_nic_active>} {(DQ (${ Id.VSub_Name NIC))})
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (command.Sentence
                                      child: 
                                        (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} 
                                          {<Id.Lit_RBracket ']'>}
                                        )
                                      terminator: <Id.Op_Semi _>
                                    )
                                  ]
                                )
                              action: [
                                (C {<echo_log>} 
                                  {
                                    (DQ <'Trying DHCP on '> ($ Id.VSub_DollarName '$NIC') <' '> 
                                      ($ Id.VSub_DollarName '$DESC')
                                    )
                                  }
                                )
                                (command.Simple
                                  words: [{<dhclient>} {(${ Id.VSub_Name NIC)}]
                                  redirects: [
                                    (redir
                                      op: <Id.Redir_Great '>'>
                                      loc: (redir_loc.Fd fd:1)
                                      arg: {<'/dev/null'>}
                                    )
                                    (redir
                                      op: <Id.Redir_Great '2>'>
                                      loc: (redir_loc.Fd fd:2)
                                      arg: {<'/dev/null'>}
                                    )
                                  ]
                                  do_fork: T
                                )
                                (command.If
                                  arms: [
                                    (if_arm
                                      cond: 
                                        (condition.Shell
                                          commands: [
                                            (command.Sentence
                                              child: 
                                                (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} 
                                                  {<-eq>} {<0>} {<Id.Lit_RBracket ']'>}
                                                )
                                              terminator: <Id.Op_Semi _>
                                            )
                                          ]
                                        )
                                      action: [
                                        (C {<export>} 
                                          {<Id.Lit_VarLike 'WRKNIC='> 
                                            (DQ ($ Id.VSub_DollarName '$NIC'))
                                          }
                                        )
                                        (command.ControlFlow
                                          token: <Id.ControlFlow_Return return>
                                          arg_word: {<0>}
                                        )
                                      ]
                                      spids: [2063 2077]
                                    )
                                  ]
                                )
                              ]
                              spids: [2023 2037]
                            )
                          ]
                        )
                      ]
                    )
                  redirects: [
                    (redir
                      op: <Id.Redir_Less '<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.ShFunction
      name: enable_auto_slaac
      body: 
        (BraceGroup
          children: [
            (command.Simple
              words: [{(${ Id.VSub_Name QUERYDIR) <'/detect-nics.sh'>}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}
                )
              ]
              do_fork: T
            )
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ALLNICS)
                  op: assign_op.Equal
                  rhs: {(DQ )}
                  spids: [2146]
                )
              ]
            )
            (command.WhileUntil
              keyword: <Id.KW_While while>
              cond: (condition.Shell commands:[(C {<read>} {<line>})])
              body: 
                (command.DoGroup
                  children: [
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:NIC)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (command_sub
                                  left_token: <Id.Left_Backtick '`'>
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (C {<echo>} {($ Id.VSub_DollarName '$line')})
                                        (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<1>})
                                      ]
                                      negated: F
                                    )
                                )
                              )
                            }
                          spids: [2161]
                        )
                      ]
                    )
                    (command.ShAssignment
                      pairs: [
                        (assign_pair
                          lhs: (sh_lhs_expr.Name name:DESC)
                          op: assign_op.Equal
                          rhs: 
                            {
                              (DQ 
                                (command_sub
                                  left_token: <Id.Left_Backtick '`'>
                                  child: 
                                    (command.Pipeline
                                      children: [
                                        (C {<echo>} {($ Id.VSub_DollarName '$line')})
                                        (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<2>})
                                      ]
                                      negated: F
                                    )
                                )
                              )
                            }
                          spids: [2187]
                        )
                      ]
                    )
                    (C {<is_nic_active>} {(DQ (${ Id.VSub_Name NIC))})
                    (command.If
                      arms: [
                        (if_arm
                          cond: 
                            (condition.Shell
                              commands: [
                                (command.Sentence
                                  child: 
                                    (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  terminator: <Id.Op_Semi _>
                                )
                              ]
                            )
                          action: [
                            (C {<echo_log>} 
                              {
                                (DQ <'Will try IPv6 SLAAC on '> ($ Id.VSub_DollarName '$NIC') <' '> 
                                  ($ Id.VSub_DollarName '$DESC')
                                )
                              }
                            )
                            (C {<ifconfig>} {(${ Id.VSub_Name NIC)} {<inet6>} {<-ifdisabled>} 
                              {<accept_rtadv>} {<up>}
                            )
                            (command.ShAssignment
                              pairs: [
                                (assign_pair
                                  lhs: (sh_lhs_expr.Name name:ALLNICS)
                                  op: assign_op.Equal
                                  rhs: {(DQ (${ Id.VSub_Name ALLNICS) <' '> (${ Id.VSub_Name NIC))}
                                  spids: [2265]
                                )
                              ]
                            )
                          ]
                          spids: [2223 2237]
                        )
                      ]
                    )
                  ]
                )
              redirects: [
                (redir
                  op: <Id.Redir_Less '<'>
                  loc: (redir_loc.Fd fd:0)
                  arg: {(${ Id.VSub_Name TMPDIR) <'/.niclist'>}
                )
              ]
            )
            (C {<echo_log>} {(DQ <'Running rtsol on '> (${ Id.VSub_Name ALLNICS))})
            (command.Simple
              words: [{<rtsol>} {<-F>} {(${ Id.VSub_Name ALLNICS)}]
              redirects: [
                (redir
                  op: <Id.Redir_Great '>'>
                  loc: (redir_loc.Fd fd:1)
                  arg: {<'/dev/null'>}
                )
                (redir
                  op: <Id.Redir_Great '2>'>
                  loc: (redir_loc.Fd fd:2)
                  arg: {<'/dev/null'>}
                )
              ]
              do_fork: T
            )
          ]
        )
    )
    (command.ShFunction
      name: get_nic_mac
      body: 
        (BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:FOUNDMAC)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (DQ 
                        (command_sub
                          left_token: <Id.Left_Backtick '`'>
                          child: 
                            (command.Pipeline
                              children: [
                                (C {<ifconfig>} {(${ Id.VSub_Number 1)})
                                (C {<grep>} {(SQ <ether>)})
                                (C {<tr>} {<-d>} {(SQ <'\\t'>)})
                                (C {<cut>} {<-d>} {(SQ <' '>)} {<-f>} {<2>})
                              ]
                              negated: F
                            )
                        )
                      )
                    }
                  spids: [2333]
                )
              ]
            )
            (C {<export>} {<FOUNDMAC>})
          ]
        )
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: enable_manual_nic
          body: 
            (BraceGroup
              children: [
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NIC)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number '$1'))}
                      spids: [2402]
                    )
                  ]
                )
                (C {<rc_halt>} {(DQ <'ifconfig '> (${ Id.VSub_Name NIC))})
                (C {<get_value_from_cfg>} {<netIP>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NETIP)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [2429]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$NETIP'))} 
                              {<Id.Lit_Equals '='>} {(DQ <DHCP>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<echo_log>} {(DQ <'Enabling DHCP on '> ($ Id.VSub_DollarName '$NIC'))})
                        (C {<rc_halt>} {(DQ <'dhclient '> (${ Id.VSub_Name NIC))})
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [2439 2456]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NETIP))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<get_value_from_cfg>} {<netMask>})
                        (command.ShAssignment
                          pairs: [
                            (assign_pair
                              lhs: (sh_lhs_expr.Name name:NETMASK)
                              op: assign_op.Equal
                              rhs: {(DQ (${ Id.VSub_Name VAL))}
                              spids: [2527]
                            )
                          ]
                        )
                        (command.If
                          arms: [
                            (if_arm
                              cond: 
                                (condition.Shell
                                  commands: [
                                    (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NETMASK))} 
                                      {<Id.Lit_RBracket ']'>}
                                    )
                                  ]
                                )
                              action: [
                                (C {<rc_halt>} 
                                  {
                                    (DQ <'ifconfig inet '> (${ Id.VSub_Name NIC) <' netmask '> 
                                      (${ Id.VSub_Name NETMASK)
                                    )
                                  }
                                )
                              ]
                              spids: [2535 2550]
                            )
                          ]
                          else_action: [
                            (C {<rc_halt>} 
                              {
                                (DQ <'ifconfig inet '> (${ Id.VSub_Name NIC) <' '> 
                                  (${ Id.VSub_Name NETIP)
                                )
                              }
                            )
                          ]
                        )
                      ]
                      spids: [2500 2515]
                    )
                  ]
                )
                (C {<get_value_from_cfg>} {<netDefaultRouter>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NETROUTE)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [2600]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NETROUTE))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<rc_halt>} {(DQ <'route add -inet default '> (${ Id.VSub_Name NETROUTE))})
                      ]
                      spids: [2608 2623]
                    )
                  ]
                )
                (C {<get_value_from_cfg>} {<netIPv6>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NETIP)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [2654]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(${ Id.VSub_Name NETIP)} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<rc_halt>} 
                          {
                            (DQ <'ifconfig inet6 '> (${ Id.VSub_Name NIC) <' '> (${ Id.VSub_Name NETIP) 
                              <' -ifdisabled up'>
                            )
                          }
                        )
                      ]
                      spids: [2662 2675]
                    )
                  ]
                )
                (C {<get_value_from_cfg>} {<netIPv6DefaultRouter>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NETROUTE)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [2706]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NETROUTE))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (C {<rc_halt>} {(DQ <'route add -inet6 default '> (${ Id.VSub_Name NETROUTE))})
                      ]
                      spids: [2714 2729]
                    )
                  ]
                )
                (command.Simple
                  words: [{<Id.Lit_Colon ':'>}]
                  redirects: [
                    (redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<'/etc/resolv.conf'>}
                    )
                  ]
                  do_fork: T
                )
                (C {<get_value_from_cfg>} {<netNameServer>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NAMESERVER)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [2761]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NAMESERVER))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.Simple
                          words: [{<echo>} {(DQ <'nameserver '> (${ Id.VSub_Name NAMESERVER))}]
                          redirects: [
                            (redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<'/etc/resolv.conf'>}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      spids: [2769 2784]
                    )
                  ]
                )
                (C {<get_value_from_cfg>} {<netIPv6NameServer>})
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NAMESERVER)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [2808]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name NAMESERVER))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.Simple
                          words: [{<echo>} {(DQ <'nameserver '> (${ Id.VSub_Name NAMESERVER))}]
                          redirects: [
                            (redir
                              op: <Id.Redir_DGreat '>>'>
                              loc: (redir_loc.Fd fd:1)
                              arg: {<'/etc/resolv.conf'>}
                            )
                          ]
                          do_fork: T
                        )
                      ]
                      spids: [2816 2831]
                    )
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: start_networking
          body: 
            (BraceGroup
              children: [
                (C {<get_value_from_cfg>} {<netDev>})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name VAL))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [2874 2889]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NETDEV)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [2901]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$NETDEV'))} 
                              {<Id.Lit_Equals '='>} {(DQ <AUTO-DHCP>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<enable_auto_dhcp>})]
                      spids: [2909 2926]
                    )
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$NETDEV'))} 
                              {<Id.Lit_Equals '='>} {(DQ <IPv6-SLAAC>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<enable_auto_slaac>})]
                      spids: [2932 2949]
                    )
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$NETDEV'))} 
                              {<Id.Lit_Equals '='>} {(DQ <AUTO-DHCP-SLAAC>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<enable_auto_dhcp>}) (C {<enable_auto_slaac>})]
                      spids: [2955 2972]
                    )
                  ]
                  else_action: [(C {<enable_manual_nic>} {(${ Id.VSub_Name NETDEV)})]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
    (command.Sentence
      child: 
        (command.ShFunction
          name: save_networking_install
          body: 
            (BraceGroup
              children: [
                (C {<get_value_from_cfg_with_spaces>} {<netSaveDev>})
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name VAL))} 
                              {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [
                        (command.ControlFlow
                          token: <Id.ControlFlow_Return return>
                          arg_word: {<0>}
                        )
                      ]
                      spids: [3022 3037]
                    )
                  ]
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:NETDEVLIST)
                      op: assign_op.Equal
                      rhs: {(DQ (${ Id.VSub_Name VAL))}
                      spids: [3049]
                    )
                  ]
                )
                (command.If
                  arms: [
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$NETDEVLIST'))} 
                              {<Id.Lit_Equals '='>} {(DQ <AUTO-DHCP>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<save_auto_dhcp>})]
                      spids: [3057 3074]
                    )
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$NETDEVLIST'))} 
                              {<Id.Lit_Equals '='>} {(DQ <IPv6-SLAAC>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<save_auto_slaac>})]
                      spids: [3080 3097]
                    )
                    (if_arm
                      cond: 
                        (condition.Shell
                          commands: [
                            (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$NETDEVLIST'))} 
                              {<Id.Lit_Equals '='>} {(DQ <AUTO-DHCP-SLAAC>)} {<Id.Lit_RBracket ']'>}
                            )
                          ]
                        )
                      action: [(C {<save_auto_dhcp>}) (C {<save_auto_slaac>})]
                      spids: [3103 3120]
                    )
                  ]
                  else_action: [
                    (command.ForEach
                      iter_name: NETDEV
                      iter_words: [{(${ Id.VSub_Name NETDEVLIST)}]
                      do_arg_iter: F
                      body: 
                        (command.DoGroup
                          children: [(C {<save_manual_nic>} {(${ Id.VSub_Name NETDEV)})]
                        )
                    )
                    (C {<save_manual_router>})
                    (C {<save_manual_nameserver>})
                  ]
                )
              ]
            )
        )
      terminator: <Id.Op_Semi _>
    )
  ]
)