(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:user) op: assign_op.Equal rhs: {(DQ )} spids: [94] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:unbound_conf) op: assign_op.Equal rhs: {(DQ )} spids: [98] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:forward_conf) op: assign_op.Equal rhs: {(DQ )} spids: [102] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:lanzones_conf) op: assign_op.Equal rhs: {(DQ )} spids: [106] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:control_conf) op: assign_op.Equal rhs: {(DQ )} spids: [110] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:control_socket) op: assign_op.Equal rhs: {(DQ )} spids: [114] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:workdir) op: assign_op.Equal rhs: {(DQ )} spids: [118] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:confdir) op: assign_op.Equal rhs: {(DQ )} spids: [122] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:chrootdir) op: assign_op.Equal rhs: {(DQ )} spids: [126] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:anchor) op: assign_op.Equal rhs: {(DQ )} spids: [130] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pidfile) op: assign_op.Equal rhs: {(DQ )} spids: [134] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:resolv_conf) op: assign_op.Equal rhs: {(DQ )} spids: [138] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:resolvconf_conf) op: assign_op.Equal rhs: {(DQ )} spids: [142] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:service) op: assign_op.Equal rhs: {(DQ )} spids: [146] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:start_unbound) op: assign_op.Equal rhs: {(DQ )} spids: [150] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:forwarders) op: assign_op.Equal rhs: {(DQ )} spids: [154] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:self) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<basename>} { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<realpath>} {(DQ ($ Id.VSub_Number '$0'))}) ) } ) ) } spids: [168] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:bkext) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<date>} {(DQ <'+%Y%m%d.%H%M%S'>)}) ) } spids: [181] ) ] ) (command.ShFunction name: set_defaults body: (BraceGroup children: [ (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name user> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonEquals ':='> arg_word:{<unbound>}) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name workdir> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {<Id.Lit_Slash '/'> <var> <Id.Lit_Slash '/'> <unbound>} ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name confdir> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {(${ Id.VSub_Name workdir) <Id.Lit_Slash '/'> <conf.d>} ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name unbound_conf> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {(${ Id.VSub_Name workdir) <Id.Lit_Slash '/'> <unbound.conf>} ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name forward_conf> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {(${ Id.VSub_Name workdir) <Id.Lit_Slash '/'> <forward.conf>} ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name lanzones_conf> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {(${ Id.VSub_Name workdir) <Id.Lit_Slash '/'> <lan-zones.conf>} ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name control_conf> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {(${ Id.VSub_Name workdir) <Id.Lit_Slash '/'> <control.conf>} ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name control_socket> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {<Id.Lit_Slash '/'> <var> <Id.Lit_Slash '/'> <run> <Id.Lit_Slash '/'> <local_unbound.ctl> } ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name anchor> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {(${ Id.VSub_Name workdir) <Id.Lit_Slash '/'> <root.key>} ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name pidfile> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {<Id.Lit_Slash '/'> <var> <Id.Lit_Slash '/'> <run> <Id.Lit_Slash '/'> <local_unbound.pid> } ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name resolv_conf> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {<Id.Lit_Slash '/'> <etc> <Id.Lit_Slash '/'> <resolv.conf>} ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name resolvconf_conf> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {<Id.Lit_Slash '/'> <etc> <Id.Lit_Slash '/'> <resolvconf.conf>} ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name service> suffix_op: (suffix_op.Unary tok: <Id.VTest_ColonEquals ':='> arg_word: {<local_unbound>} ) ) } ) (C {<Id.Lit_Colon ':'>} { (braced_var_sub token: <Id.VSub_Name start_unbound> suffix_op: (suffix_op.Unary tok:<Id.VTest_ColonEquals ':='> arg_word:{<yes>}) ) } ) ] ) ) (command.ShFunction name: set_chrootdir body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:chrootdir) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name workdir))} spids: [397] ) ] ) (command.ForEach iter_name: file iter_words: [ {(DQ (${ Id.VSub_Name unbound_conf))} {(DQ (${ Id.VSub_Name forward_conf))} {(DQ (${ Id.VSub_Name lanzones_conf))} {(DQ (${ Id.VSub_Name control_conf))} {(DQ (${ Id.VSub_Name anchor))} ] do_arg_iter: F body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name file> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Pound '#'> arg_word: { (braced_var_sub token: <Id.VSub_Name workdir> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Percent '%'> arg_word: {<Id.Lit_Slash '/'>} ) ) <Id.Lit_Slash '/'> } ) ) ) } {<Id.Lit_Equals '='>} {(DQ (${ Id.VSub_Name file))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [ {<echo>} { (DQ <'warning: '> (${ Id.VSub_Name file) <' is outside '> (${ Id.VSub_Name workdir) ) } ] redirects: [ (redir op: <Id.Redir_GreatAnd '>&'> loc: (redir_loc.Fd fd:1) arg: {<2>} ) ] do_fork: T ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:chrootdir) op: assign_op.Equal rhs: {(DQ )} spids: [497] ) ] ) ] spids: [448 477] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name chrootdir))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ <'warning: disabling chroot'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) ] spids: [508 524] ) ] ) ] ) ) (command.ShFunction name: get_nameservers body: (BraceGroup children: [ (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [(command.Sentence child:(C {<read>} {<line>}) terminator:<Id.Op_Semi _>)] ) body: (command.DoGroup children: [ (C {<local>} {<Id.Lit_VarLike 'bareline='> (braced_var_sub token: <Id.VSub_Name line> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPercent '%%'> arg_word: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\#'>) <Id.Lit_Other '*'> } ) ) } ) (C {<local>} {<Id.Lit_VarLike 'key='> (braced_var_sub token: <Id.VSub_Name bareline> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPercent '%%'> arg_word: {<' '> <Id.Lit_Other '*'>} ) ) } ) (C {<local>} {<Id.Lit_VarLike 'value='> (braced_var_sub token: <Id.VSub_Name bareline> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Pound '#'> arg_word: {<Id.Lit_Other '*'> <' '>} ) ) } ) (command.Case to_match: {(${ Id.VSub_Name key)} arms: [ (case_arm pat_list: [{<nameserver>}] action: [ (command.Case to_match: {(${ Id.VSub_Name value)} arms: [ (case_arm pat_list: [ {<127.0.0.1>} {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <1>} {<localhost>} {<localhost.> <Id.Lit_Star '*'>} ] spids: [627 637 640 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<echo>} {(DQ (${ Id.VSub_Name value))})] spids: [643 644 656 -1] ) ] ) ] spids: [614 615 662 -1] ) ] ) ] ) ) ] ) ) (command.ShFunction name: gen_resolv_conf body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'localhost='> <no>}) (C {<local>} {<Id.Lit_VarLike 'edns0='> <no>}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [(command.Sentence child:(C {<read>} {<line>}) terminator:<Id.Op_Semi _>)] ) body: (command.DoGroup children: [ (C {<local>} {<Id.Lit_VarLike 'bareline='> (braced_var_sub token: <Id.VSub_Name line> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPercent '%%'> arg_word: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\#'>) <Id.Lit_Other '*'> } ) ) } ) (C {<local>} {<Id.Lit_VarLike 'key='> (braced_var_sub token: <Id.VSub_Name bareline> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPercent '%%'> arg_word: {<' '> <Id.Lit_Other '*'>} ) ) } ) (C {<local>} {<Id.Lit_VarLike 'value='> (braced_var_sub token: <Id.VSub_Name bareline> suffix_op: (suffix_op.Unary tok: <Id.VOp1_Pound '#'> arg_word: {<Id.Lit_Other '*'> <' '>} ) ) } ) (command.Case to_match: {(${ Id.VSub_Name key)} arms: [ (case_arm pat_list: [{<nameserver>}] action: [ (command.Case to_match: {(${ Id.VSub_Name value)} arms: [ (case_arm pat_list: [ {<127.0.0.1>} {<Id.Lit_Colon ':'> <Id.Lit_Colon ':'> <1>} {<localhost>} {<localhost.> <Id.Lit_Star '*'>} ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:localhost) op: assign_op.Equal rhs: {<yes>} spids: [789] ) ] ) ] spids: [776 786 793 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<echo>} {<-n>} {(DQ <'# '>)})] spids: [796 797 809 -1] ) ] ) ] spids: [763 764 815 -1] ) (case_arm pat_list: [{<options>}] action: [ (command.Case to_match: {(${ Id.VSub_Name value)} arms: [ (case_arm pat_list: [{<Id.Lit_Star '*'> <edns0> <Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:edns0) op: assign_op.Equal rhs: {<yes>} spids: [837] ) ] ) ] spids: [831 834 841 -1] ) ] ) ] spids: [818 819 847 -1] ) ] ) (C {<echo>} {(DQ (${ Id.VSub_Name line))}) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name localhost))} {<Id.Lit_Equals '='>} {(DQ <no>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<echo>} {(DQ <'nameserver 127.0.0.1'>)})] spids: [865 885] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name edns0))} {<Id.Lit_Equals '='>} {(DQ <no>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<echo>} {(DQ <'options edns0'>)})] spids: [898 918] ) ] ) ] ) ) (command.ShFunction name: do_not_edit body: (BraceGroup children: [ (C {<echo>} {(DQ <'# This file was generated by '> ($ Id.VSub_DollarName '$self') <.>)}) (C {<echo>} {(DQ <'# Modifications will be overwritten.'>)}) ] ) ) (command.ShFunction name: gen_resolvconf_conf body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'style='> (DQ ($ Id.VSub_Number '$1'))}) (C {<do_not_edit>}) (C {<echo>} { (DQ <'resolv_conf='> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'/dev/null'> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <' # prevent updating '> (${ Id.VSub_Name resolv_conf) ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name style))} {<Id.Lit_Equals '='>} {(DQ <dynamic>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} { (DQ <'unbound_conf='> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) (${ Id.VSub_Name forward_conf) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ) } ) (C {<echo>} { (DQ <'unbound_pid='> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) (${ Id.VSub_Name pidfile) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ) } ) (C {<echo>} { (DQ <'unbound_service='> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) (${ Id.VSub_Name service) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ) } ) (C {<echo>} { (DQ <'unbound_restart='> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) <'service '> (${ Id.VSub_Name service) <' reload'> (word_part.EscapedLiteral token: <Id.Lit_EscapedChar '\\"'> ) ) } ) ] spids: [1020 1040] ) ] else_action: [(C {<echo>} {(DQ <'# Static DNS configuration'>)})] ) ] ) ) (command.ShFunction name: gen_forward_conf body: (BraceGroup children: [ (C {<do_not_edit>}) (C {<echo>} {(DQ <'forward-zone:'>)}) (C {<echo>} {(DQ <' name: .'>)}) (command.ForEach iter_name: forwarder do_arg_iter: T body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple words: [ {<expr>} {(DQ (${ Id.VSub_Name forwarder))} {<Id.Lit_Colon ':'>} { (DQ <'^[0-9A-Fa-f:.]'> <Id.Lit_BadBackslash '\\'> <'{1,'> <Id.Lit_BadBackslash '\\'> <'}'> <Id.Lit_Dollar '$'> ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(DQ <' forward-addr: '> (${ Id.VSub_Name forwarder))}) ] spids: [1154 1180] ) ] else_action: [ (C {<echo>} {(DQ <' forward-host: '> (${ Id.VSub_Name forwarder))}) ] ) ] ) ) ] ) ) (command.ShFunction name: gen_lanzones_conf body: (BraceGroup children: [ (C {<do_not_edit>}) (C {<echo>} {(DQ <'server:'>)}) (C {<echo>} {(DQ <' # Unblock reverse lookups for LAN addresses'>)}) (C {<echo>} {(DQ <' unblock-lan-zones: yes'>)}) (C {<echo>} {(DQ <' insecure-lan-zones: yes'>)}) ] ) ) (command.ShFunction name: gen_control_conf body: (BraceGroup children: [ (C {<do_not_edit>}) (C {<echo>} {(DQ <'remote-control:'>)}) (C {<echo>} {(DQ <' control-enable: yes'>)}) (C {<echo>} {(DQ <' control-interface: '> (${ Id.VSub_Name control_socket))}) (C {<echo>} {(DQ <' control-use-cert: no'>)}) ] ) ) (command.ShFunction name: gen_unbound_conf body: (BraceGroup children: [ (C {<do_not_edit>}) (C {<echo>} {(DQ <'server:'>)}) (C {<echo>} {(DQ <' username: '> (${ Id.VSub_Name user))}) (C {<echo>} {(DQ <' directory: '> (${ Id.VSub_Name workdir))}) (C {<echo>} {(DQ <' chroot: '> (${ Id.VSub_Name chrootdir))}) (C {<echo>} {(DQ <' pidfile: '> (${ Id.VSub_Name pidfile))}) (C {<echo>} {(DQ <' auto-trust-anchor-file: '> (${ Id.VSub_Name anchor))}) (C {<echo>} {(DQ )}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ (${ Id.VSub_Name forward_conf))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<echo>} {(DQ <'include: '> (${ Id.VSub_Name forward_conf))})] spids: [1397 1413] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ (${ Id.VSub_Name lanzones_conf))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<echo>} {(DQ <'include: '> (${ Id.VSub_Name lanzones_conf))})] spids: [1429 1445] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ (${ Id.VSub_Name control_conf))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<echo>} {(DQ <'include: '> (${ Id.VSub_Name control_conf))})] spids: [1461 1477] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-d>} {(DQ (${ Id.VSub_Name confdir))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<echo>} {(DQ <'include: '> (${ Id.VSub_Name confdir) <'/*.conf'>)})] spids: [1493 1509] ) ] ) ] ) ) (command.ShFunction name: replace body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'file='> (DQ ($ Id.VSub_Number '$1'))}) (C {<local>} {<Id.Lit_VarLike 'newfile='> (DQ ($ Id.VSub_Number '$2'))}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-f>} {(DQ (${ Id.VSub_Name file))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(DQ (${ Id.VSub_Name file) <' created'>)}) (C {<mv>} {(DQ (${ Id.VSub_Name newfile))} {(DQ (${ Id.VSub_Name file))}) ] spids: [1563 1581] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [ (C {<cmp>} {<-s>} {(DQ (${ Id.VSub_Name file))} {(DQ (${ Id.VSub_Name newfile))} ) ] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<local>} {<Id.Lit_VarLike 'oldfile='> (DQ (${ Id.VSub_Name file) <.> (${ Id.VSub_Name bkext)) } ) (C {<echo>} { (DQ <'original '> (${ Id.VSub_Name file) <' saved as '> (${ Id.VSub_Name oldfile) ) } ) (C {<mv>} {(DQ (${ Id.VSub_Name file))} {(DQ (${ Id.VSub_Name oldfile))}) (C {<mv>} {(DQ (${ Id.VSub_Name newfile))} {(DQ (${ Id.VSub_Name file))}) ] spids: [1609 1631] ) ] else_action: [ (C {<echo>} {(DQ (${ Id.VSub_Name file) <' not modified'>)}) (C {<rm>} {(DQ (${ Id.VSub_Name newfile))}) ] ) ] ) ) (command.ShFunction name: usage body: (BraceGroup children: [ (command.Simple words: [{<exec>}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (C {<echo>} {(DQ <'usage: '> ($ Id.VSub_DollarName '$self') <' [options] [forwarder ...]'>)}) (C {<echo>} {(DQ <'options:'>)}) (C {<echo>} {(DQ <' -n do not start unbound'>)}) (C {<echo>} {(DQ <' -a path full path to trust anchor file'>)}) (C {<echo>} {(DQ <' -C path full path to additional configuration directory'>)}) (C {<echo>} {(DQ <' -c path full path to unbound configuration file'>)}) (C {<echo>} {(DQ <' -f path full path to forwarding configuration'>)}) (C {<echo>} {(DQ <' -O path full path to remote control socket'>)}) (C {<echo>} {(DQ <' -o path full path to remote control configuration'>)}) (C {<echo>} {(DQ <' -p path full path to pid file'>)}) (C {<echo>} {(DQ <' -R path full path to resolvconf.conf'>)}) (C {<echo>} {(DQ <' -r path full path to resolv.conf'>)}) (C {<echo>} {(DQ <' -s service name of unbound service'>)}) (C {<echo>} {(DQ <' -u user user to run unbound as'>)}) (C {<echo>} {(DQ <' -w path full path to working directory'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] ) ) (command.ShFunction name: main body: (BraceGroup children: [ (C {<umask>} {<022>}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.Sentence child: (C {<getopts>} {(DQ <'a:C:c:f:no:p:R:r:s:u:w:'>)} {<option>}) terminator: <Id.Op_Semi _> ) ] ) body: (command.DoGroup children: [ (command.Case to_match: {($ Id.VSub_DollarName '$option')} arms: [ (case_arm pat_list: [{<a>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:anchor) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [1915] ) ] ) ] spids: [1911 1912 1921 -1] ) (case_arm pat_list: [{<C>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:confdir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [1928] ) ] ) ] spids: [1924 1925 1934 -1] ) (case_arm pat_list: [{<c>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:unbound_conf) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [1941] ) ] ) ] spids: [1937 1938 1947 -1] ) (case_arm pat_list: [{<f>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:forward_conf) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [1954] ) ] ) ] spids: [1950 1951 1960 -1] ) (case_arm pat_list: [{<n>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:start_unbound) op: assign_op.Equal rhs: {(DQ <no>)} spids: [1967] ) ] ) ] spids: [1963 1964 1973 -1] ) (case_arm pat_list: [{<O>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:control_socket) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [1980] ) ] ) ] spids: [1976 1977 1986 -1] ) (case_arm pat_list: [{<o>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:control_conf) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [1993] ) ] ) ] spids: [1989 1990 1999 -1] ) (case_arm pat_list: [{<p>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pidfile) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [2007] ) ] ) ] spids: [2003 2004 2013 -1] ) (case_arm pat_list: [{<R>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:resolvconf_conf) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [2020] ) ] ) ] spids: [2016 2017 2026 -1] ) (case_arm pat_list: [{<r>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:resolv_conf) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [2033] ) ] ) ] spids: [2029 2030 2039 -1] ) (case_arm pat_list: [{<s>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:service) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [2046] ) ] ) ] spids: [2042 2043 2052 -1] ) (case_arm pat_list: [{<u>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:user) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [2059] ) ] ) ] spids: [2055 2056 2065 -1] ) (case_arm pat_list: [{<w>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:workdir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTARG'))} spids: [2072] ) ] ) ] spids: [2068 2069 2078 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [(C {<usage>})] spids: [2081 2082 2088 -1] ) ] ) ] ) ) (C {<shift>} { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Minus left: <Id.Lit_ArithVarLike OPTIND> right: {<Id.Lit_Digits 1>} ) ) } ) (C {<set_defaults>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:forwarders) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_At '$@'))} spids: [2127] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$forwarders'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(DQ <'Extracting forwarders from '> (${ Id.VSub_Name resolv_conf) <.>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:forwarders) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Simple words: [{<get_nameservers>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ (${ Id.VSub_Name resolv_conf))} ) ] do_fork: T ) ) } spids: [2161] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:style) op: assign_op.Equal rhs: {<dynamic>} spids: [2174] ) ] ) ] spids: [2133 2147] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:style) op: assign_op.Equal rhs: {<static>} spids: [2181] ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name forwarders))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {<-n>} { (DQ <'No forwarders found in '> (braced_var_sub token: <Id.VSub_Name resolv_conf> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPound '##'> arg_word: {<Id.Lit_Other '*'> <Id.Lit_Slash '/'>} ) ) <', '> ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ (${ Id.VSub_Name forward_conf))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} { (DQ <'using existing '> (braced_var_sub token: <Id.VSub_Name forward_conf> suffix_op: (suffix_op.Unary tok: <Id.VOp1_DPound '##'> arg_word: {<Id.Lit_Other '*'> <Id.Lit_Slash '/'>} ) ) <.> ) } ) ] spids: [2236 2252] ) ] else_action: [(C {<echo>} {(DQ <'unbound will recurse.'>)})] ) ] spids: [2201 2217] ) ] else_action: [ (C {<local>} {<Id.Lit_VarLike 'tmp_forward_conf='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<mktemp>} {<-u>} {(DQ (${ Id.VSub_Name forward_conf) <.XXXXX>)}) ) } ) (command.Pipeline children: [ (C {<gen_forward_conf>} {(${ Id.VSub_Name forwarders)}) (command.Simple words: [{<unexpand>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name tmp_forward_conf))} ) ] do_fork: T ) ] negated: F ) (C {<replace>} {(DQ (${ Id.VSub_Name forward_conf))} {(DQ (${ Id.VSub_Name tmp_forward_conf))} ) ] ) (C {<local>} {<Id.Lit_VarLike 'tmp_lanzones_conf='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<mktemp>} {<-u>} {(DQ (${ Id.VSub_Name lanzones_conf) <.XXXXX>)}) ) } ) (command.Pipeline children: [ (C {<gen_lanzones_conf>}) (command.Simple words: [{<unexpand>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name tmp_lanzones_conf))} ) ] do_fork: T ) ] negated: F ) (C {<replace>} {(DQ (${ Id.VSub_Name lanzones_conf))} {(DQ (${ Id.VSub_Name tmp_lanzones_conf))} ) (C {<local>} {<Id.Lit_VarLike 'tmp_control_conf='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<mktemp>} {<-u>} {(DQ (${ Id.VSub_Name control_conf) <.XXXXX>)}) ) } ) (command.Pipeline children: [ (C {<gen_control_conf>}) (command.Simple words: [{<unexpand>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name tmp_control_conf))} ) ] do_fork: T ) ] negated: F ) (C {<replace>} {(DQ (${ Id.VSub_Name control_conf))} {(DQ (${ Id.VSub_Name tmp_control_conf))} ) (C {<local>} {<Id.Lit_VarLike 'tmp_unbound_conf='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<mktemp>} {<-u>} {(DQ (${ Id.VSub_Name unbound_conf) <.XXXXX>)}) ) } ) (C {<set_chrootdir>}) (command.Pipeline children: [ (C {<gen_unbound_conf>}) (command.Simple words: [{<unexpand>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name tmp_unbound_conf))} ) ] do_fork: T ) ] negated: F ) (C {<replace>} {(DQ (${ Id.VSub_Name unbound_conf))} {(DQ (${ Id.VSub_Name tmp_unbound_conf))} ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name start_unbound))} {<Id.Lit_Equals '='>} {(DQ <no>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) spids: [2543 2563] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [(C {<service>} {(DQ (${ Id.VSub_Name service))} {<enabled>})] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} { (DQ <'Please enable '> ($ Id.VSub_DollarName '$service') <' in rc.conf(5) and try again.'> ) } ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [2570 2586] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.Pipeline children: [(C {<service>} {(DQ (${ Id.VSub_Name service))} {<restart>})] negated: T ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<echo>} {(DQ <'Failed to start '> ($ Id.VSub_DollarName '$service') <.>)}) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [2603 2619] ) ] ) (C {<local>} {<Id.Lit_VarLike 'tmp_resolvconf_conf='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<mktemp>} {<-u>} {(DQ (${ Id.VSub_Name resolvconf_conf) <.XXXXX>)}) ) } ) (command.Pipeline children: [ (C {<gen_resolvconf_conf>} {(DQ (${ Id.VSub_Name style))}) (command.Simple words: [{<unexpand>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name tmp_resolvconf_conf))} ) ] do_fork: T ) ] negated: F ) (C {<replace>} {(DQ (${ Id.VSub_Name resolvconf_conf))} {(DQ (${ Id.VSub_Name tmp_resolvconf_conf))} ) (C {<local>} {<Id.Lit_VarLike 'tmp_resolv_conf='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<mktemp>} {<-u>} {(DQ (${ Id.VSub_Name resolv_conf) <.XXXXX>)}) ) } ) (command.Pipeline children: [ (command.Simple words: [{<gen_resolv_conf>}] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ (${ Id.VSub_Name resolv_conf))} ) ] do_fork: T ) (command.Simple words: [{<unexpand>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ (${ Id.VSub_Name tmp_resolv_conf))} ) ] do_fork: T ) ] negated: F ) (C {<replace>} {(DQ (${ Id.VSub_Name resolv_conf))} {(DQ (${ Id.VSub_Name tmp_resolv_conf))}) ] ) ) (C {<main>} {(DQ ($ Id.VSub_At '$@'))}) ] )