(command.CommandList children: [ (C {<.>} {(${ Id.VSub_Name BACKEND) <'/functions.sh'>}) (C {<.>} {(${ Id.VSub_Name BACKEND) <'/functions-networking.sh'>}) (C {<.>} {(${ Id.VSub_Name BACKEND) <'/functions-parse.sh'>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} {(DQ (${ Id.VSub_Number 1))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<echo>} {(DQ <'ERROR: Install configuration '> ($ Id.VSub_Number '$1') <' does not exist!'>)} ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [113 129] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CONF) op: assign_op.Equal rhs: {(${ Id.VSub_Number 1)} spids: [151] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INSTALL_CFG) op: assign_op.Equal rhs: {(DQ <'/tmp/pc-sysinstall.cfg'>)} spids: [156] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PCCFG) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<grep>} {(DQ <'pc_config:'>)} {(${ Id.VSub_Name CONF)}) (C {<grep>} {<-v>} {(DQ <'^#'>)}) (C {<sed>} {(DQ <'s|pc_config: ||g'>)}) (C {<sed>} {(DQ <'s|pc_config:||g'>)}) ] negated: F ) ) } spids: [165] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SHUTDOWN_CMD) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<grep>} {(DQ <'shutdown_cmd:'>)} {(${ Id.VSub_Name CONF)}) (C {<grep>} {<-v>} {(DQ <'^#'>)}) (C {<sed>} {(DQ <'s|shutdown_cmd: ||g'>)}) (C {<sed>} {(DQ <'s|shutdown_cmd:||g'>)}) ] negated: F ) ) } spids: [206] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CONFIRM_INS) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<grep>} {(DQ <'confirm_install:'>)} {(${ Id.VSub_Name CONF)}) (C {<grep>} {<-v>} {(DQ <'^#'>)}) (C {<sed>} {(DQ <'s|confirm_install: ||g'>)}) (C {<sed>} {(DQ <'s|confirm_install:||g'>)}) ] negated: F ) ) } spids: [247] ) ] ) (command.Pipeline children: [ (C {<echo>} {(DQ (${ Id.VSub_Name PCCFG))}) (command.Simple words: [{<grep>} {<-q>} {<-e>} {(DQ <'^http'>)} {<-e>} {(DQ <'^ftp'>)}] 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 '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>}) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} {(DQ (${ Id.VSub_Name INSTALL_CFG))} {<Id.Lit_RBracket ']'>} ) ] ) action: [(C {<cp>} {(${ Id.VSub_Name PCCFG)} {(${ Id.VSub_Name INSTALL_CFG)})] spids: [340 357] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} {(DQ (${ Id.VSub_Name INSTALL_CFG))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<echo>} { (DQ <'Error: '> (${ Id.VSub_Name INSTALL_CFG) <' is missing! Exiting in 10 seconds...'> ) } ) (C {<sleep>} {<10>}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<150>} ) ] spids: [378 395] ) ] ) ] spids: [321 333] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NICCFG) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<grep>} {(DQ <'nic_config:'>)} {(${ Id.VSub_Name CONF)}) (C {<grep>} {<-v>} {(DQ <'^#'>)}) (C {<sed>} {(DQ <'s|nic_config: ||g'>)}) (C {<sed>} {(DQ <'s|nic_config:||g'>)}) ] negated: F ) ) } spids: [428] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name NICCFG))} {<Id.Lit_Equals '='>} {(DQ <dhcp-all>)} {<-o>} {(DQ (${ Id.VSub_Name NICCFG))} {<Id.Lit_Equals '='>} {(DQ <DHCP-ALL>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [(C {<enable_auto_dhcp>})] spids: [470 503] ) ] else_action: [ (C {<echo>} { (DQ <'Running command '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'ifconfig '> (${ Id.VSub_Name NICCFG) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ) } ) (C {<ifconfig>} {(${ Id.VSub_Name NICCFG)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WRKNIC) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Name NICCFG)}) (C {<cut>} {<-d>} {(SQ <' '>)} {<-f>} {<1>}) ] negated: F ) ) ) } spids: [536] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NICDNS) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<grep>} {(DQ <'nic_dns:'>)} {(${ Id.VSub_Name CONF)}) (C {<grep>} {<-v>} {(DQ <'^#'>)}) (C {<sed>} {(DQ <'s|nic_dns: ||g'>)}) (C {<sed>} {(DQ <'s|nic_dns:||g'>)}) ] negated: F ) ) } spids: [564] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NICGATE) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<grep>} {(DQ <'nic_gateway:'>)} {(${ Id.VSub_Name CONF)}) (C {<grep>} {<-v>} {(DQ <'^#'>)}) (C {<sed>} {(DQ <'s|nic_gateway: ||g'>)}) (C {<sed>} {(DQ <'s|nic_gateway:||g'>)}) ] negated: F ) ) } spids: [606] ) ] ) (command.Simple words: [{<echo>} {(DQ <'nameserver '> (${ Id.VSub_Name NICDNS))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/etc/resolv.conf'>} ) ] do_fork: T ) (C {<echo>} { (DQ <'Running command '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'route add default '> (${ Id.VSub_Name NICGATE) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ) } ) (C {<route>} {<add>} {<default>} {(${ Id.VSub_Name NICGATE)}) ] ) (C {<get_nic_mac>} {(DQ ($ Id.VSub_DollarName '$WRKNIC'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:nic_mac) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name FOUNDMAC))} spids: [698] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PCCFG) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Name PCCFG)}) (C {<sed>} {(DQ <'s|%%NIC_MAC%%|'> (${ Id.VSub_Name nic_mac) <'|g'>)}) ] negated: F ) ) } spids: [707] ) ] ) (C {<echo>} { (DQ <'Fetching cfg with: '> (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) <'fetch -o '> (${ Id.VSub_Name INSTALL_CFG) <' '> (${ Id.VSub_Name PCCFG) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\"'>) ) } ) (C {<fetch>} {<-o>} {(DQ (${ Id.VSub_Name INSTALL_CFG))} {(DQ (${ Id.VSub_Name PCCFG))}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<echo>} {(DQ <'ERROR: Failed to fetch '> (${ Id.VSub_Name PCCFG) <', install aborted'>)} ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<150>}) ] spids: [770 783] ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-e>} {(DQ (${ Id.VSub_Name INSTALL_CFG))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name CONFIRM_INS))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <no>)} {<-a>} {(DQ (${ Id.VSub_Name CONFIRM_INS))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <NO>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<echo>} { (DQ < 'Type in \'install\' to begin automated installation. Warning: Data on target disks may be destroyed!' > ) } ) (C {<read>} {<tmp>}) (command.Case to_match: {($ Id.VSub_DollarName '$tmp')} arms: [ (case_arm pat_list: [{<install>} {<INSTALL>}] spids: [887 890 892 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Sentence child: (C {<echo>} {(DQ <'Install canceled!'>)}) terminator: <Id.Op_Semi _> ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<150>} ) ] spids: [895 896 910 -1] ) ] ) ] spids: [830 865] ) ] ) (C {<pc-sysinstall>} {<-c>} {(${ Id.VSub_Name INSTALL_CFG)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$SHUTDOWN_CMD'))} {<Id.Lit_RBracket ']'>} ) ] ) action: [(C {(${ Id.VSub_Name SHUTDOWN_CMD)})] spids: [945 958] ) ] else_action: [ (C {<echo>} {(DQ <'SUCCESS: Installation finished! Press ENTER to reboot.'>)}) (C {<read>} {<tmp>}) (C {<shutdown>} {<-r>} {<now>}) ] ) ] spids: [929 942] ) ] else_action: [ (C {<echo>} {(DQ <'ERROR: Installation failed, press ENTER to drop to shell.'>)}) (C {<read>} {<tmp>}) (C {<'/bin/csh'>}) ] ) ] spids: [811 825] ) ] else_action: [ (C {<echo>} {(DQ <'ERROR: Failed to get /tmp/pc-sysinstall.cfg for automated install...'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<150>}) ] ) ] )