(command.CommandList children: [ (command.Sentence child: (command.ShFunction name: check_for_enc_pass body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CURLINE) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [93] ) ] ) (C {<get_next_cfg_line>} {(DQ (${ Id.VSub_Name CFGF))} {(DQ (${ Id.VSub_Name CURLINE))}) (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Name VAL)}) (command.Simple words: [{<grep>} {<-q>} {(DQ <'^encpass='>)}] 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: [ (C {<get_value_from_string>} {(DQ (${ Id.VSub_Name VAL))}) (command.ControlFlow token: <Id.ControlFlow_Return return> ) ] spids: [139 153] ) ] ) (C {<export>} {<Id.Lit_VarLike 'VAL='> (DQ )}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: get_fs_line_xvars body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ACTIVEDEV) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 1))} spids: [199] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:LINE) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Number 2))} spids: [207] ) ] ) (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$LINE')}) (C {<cut>} {<-d>} {(SQ <' '>)} {<-f>} {<4>}) (command.Simple words: [{<grep>} {<-q>} {(SQ <'('>)}] 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 '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.ControlFlow token:<Id.ControlFlow_Return return>) terminator: <Id.Op_Semi _> ) ] spids: [248 262] ) ] ) (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$LINE')}) (command.Simple words: [{<grep>} {<-q>} {(SQ <'^ZFS'>)}] 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.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZTYPE) op: assign_op.Equal rhs: {(DQ <NONE>)} spids: [311] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZFSVARS) 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>} {<4-20>}) (C {<cut>} {<-d>} {(SQ <'('>)} {<-f>} {<2->}) (C {<cut>} {<-d>} {(SQ <')'>)} {<-f>} {<1>}) (C {<xargs>}) ] negated: F ) ) ) } spids: [317] ) ] ) (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$ZFSVARS')}) (command.Simple words: [ {<grep>} {<-qE>} {(DQ <'^(disk|file|mirror|raidz(1|2|3)?|spare|log|cache):'>)} ] 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.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZTYPE) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$ZFSVARS')}) (C {<cut>} {<-f1>} {<-d> <Id.Lit_Colon ':'>}) ] negated: F ) ) } spids: [410] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tmpVars) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$ZFSVARS')}) (C {<sed>} { (DQ <'s|'> ($ Id.VSub_DollarName '$ZTYPE') <': ||g'> ) } ) (C {<sed>} { (DQ <'s|'> ($ Id.VSub_DollarName '$ZTYPE') <':||g'> ) } ) ] negated: F ) ) } spids: [429] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZFSVARS) op: assign_op.Equal rhs: {(DQ )} spids: [459] ) ] ) (command.ForEach iter_name: i iter_words: [{($ Id.VSub_DollarName '$tmpVars')}] do_arg_iter: F body: (command.DoGroup children: [ (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$i')}) (C {<grep>} {<-q>} {(SQ <'/dev/'>)}) ] 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.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZFSVARS) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$ZFSVARS') <' /dev/'> (${ Id.VSub_Name i) ) } spids: [512] ) ] ) ] spids: [495 509] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZFSVARS) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$ZFSVARS') <' '> ($ Id.VSub_DollarName '$i') ) } spids: [525] ) ] ) ] ) ] ) ) ] spids: [393 407] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name ZTYPE))} {<Id.Lit_Equals '='>} {(DQ <NONE>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:VAR) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name ACTIVEDEV) <' '> (${ Id.VSub_Name ZFSVARS) ) } spids: [570] ) ] ) ] spids: [547 567] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:VAR) op: assign_op.Equal rhs: { (DQ (${ Id.VSub_Name ZTYPE) <' '> (${ Id.VSub_Name ACTIVEDEV) <' '> (${ Id.VSub_Name ZFSVARS) ) } spids: [585] ) ] ) ] ) (C {<export>} {<VAR>}) (command.ControlFlow token: <Id.ControlFlow_Return return> ) ] spids: [294 308] ) ] ) (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$LINE')}) (command.Simple words: [{<grep>} {<-q>} {(SQ <'^UFS'>)}] 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.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FSVARS) 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->}) (C {<cut>} {<-d>} {(SQ <')'>)} {<-f>} {<1>}) (C {<xargs>}) ] negated: F ) ) ) } spids: [658] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:VAR) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name FSVARS))} spids: [702] ) ] ) (C {<export>} {<VAR>}) (command.ControlFlow token: <Id.ControlFlow_Return return> ) ] spids: [641 655] ) ] ) (C {<export>} {<Id.Lit_VarLike 'VAR='> (DQ )}) (command.ControlFlow token:<Id.ControlFlow_Return return>) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: setup_zfs_mirror_parts body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_nZFS) op: assign_op.Equal rhs: {(DQ )} spids: [749] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ZTYPE) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Number 1)}) (C {<awk>} {(SQ <'{print $1}'>)}) ] negated: F ) ) ) } spids: [755] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_mirrline) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Number 1)}) (C {<sed>} {(SQ <'s|mirror ||g'>)}) (C {<sed>} {(SQ <'s|raidz1 ||g'>)}) (C {<sed>} {(SQ <'s|raidz2 ||g'>)}) (C {<sed>} {(SQ <'s|raidz3 ||g'>)}) (C {<sed>} {(SQ <'s|raidz ||g'>)}) ] negated: F ) ) ) } spids: [782] ) ] ) (command.ForEach iter_name: _zvars iter_words: [{($ Id.VSub_DollarName '$_mirrline')}] do_arg_iter: F body: (command.DoGroup children: [ (command.Simple words: [ {<echo>} {(DQ <'Looping through _zvars: '> ($ Id.VSub_DollarName '$_zvars'))} ] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name LOGOUT)} ) ] do_fork: T ) (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$_zvars'))}) (command.Simple words: [{<grep>} {<-q>} {(DQ (${ Id.VSub_Number 2))}] 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.Sentence child: (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) terminator: <Id.Op_Semi _> ) ] spids: [883 897] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$_zvars'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) terminator: <Id.Op_Semi _> ) ] spids: [906 920] ) ] ) (command.Simple words: [{<is_disk>} {(DQ ($ Id.VSub_DollarName '$_zvars'))}] 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: [ (command.Simple words: [ {<echo>} {(DQ <'Setting up ZFS disk '> ($ Id.VSub_DollarName '$_zvars'))} ] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name LOGOUT)} ) ] do_fork: T ) (command.Simple words: [{<init_gpt_full_disk>} {(DQ ($ Id.VSub_DollarName '$_zvars'))}] 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: [ {<rc_halt>} { (DQ <'gpart add -a 4k -t freebsd-zfs '> (${ Id.VSub_Name _zvars)) } ] 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: [ {<rc_halt>} { (DQ <'gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 '> (${ Id.VSub_Name _zvars) ) } ] 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.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_nZFS) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$_nZFS') <' '> (${ Id.VSub_Name _zvars) <p2> ) } spids: [1018] ) ] ) ] spids: [943 957] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_nZFS) op: assign_op.Equal rhs: { (DQ ($ Id.VSub_DollarName '$_nZFS') <' '> (${ Id.VSub_Name _zvars) ) } spids: [1033] ) ] ) ] ) ] ) ) (C {<echo>} { (DQ ($ Id.VSub_DollarName '$ZTYPE') <' '> ($ Id.VSub_Number '$2') <' '> (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$_nZFS')}) (C {<tr>} {<-s>} {(SQ <' '>)}) ] negated: F ) ) ) } ) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: gen_glabel_name body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MOUNT) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [1092] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TYPE) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2'))} spids: [1098] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NUM) op: assign_op.Equal rhs: {(DQ <0>)} spids: [1104] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MAXNUM) op: assign_op.Equal rhs: {(DQ <20>)} spids: [1110] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$TYPE'))} {<Id.Lit_Equals '='>} {(DQ <ZFS>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NAME) op: assign_op.Equal rhs: {(DQ <zpool>)} spids: [1138] ) ] ) ] spids: [1117 1135] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$MOUNT'))} {<Id.Lit_Equals '='>} {(DQ <'/'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NAME) op: assign_op.Equal rhs: {(DQ <rootfs>)} spids: [1165] ) ] ) ] spids: [1144 1162] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name TYPE))} {<Id.Lit_Equals '='>} {(DQ <SWAP>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NAME) op: assign_op.Equal rhs: {(DQ <swap>)} spids: [1200] ) ] ) ] spids: [1178 1197] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NAME) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$MOUNT')}) (C {<sed>} {(SQ <'s|/||g'>)}) (C {<sed>} {(SQ <'s| ||g'>)}) ] negated: F ) ) ) } spids: [1209] ) ] ) ] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:Z) op: assign_op.Equal rhs: {<1>} spids: [1251] ) ] ) ] ) body: (command.DoGroup children: [ (command.Pipeline children: [ (C {<glabel>} {<status>}) (command.Simple words: [{<grep>} {<-q>} {(DQ (${ Id.VSub_Name NAME) (${ Id.VSub_Name NUM))}] 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.ControlFlow token:<Id.ControlFlow_Break break>)] spids: [1281 1294] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:NUM) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike NUM> right: {<Id.Lit_Digits 1>} ) ) } spids: [1303] ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$NUM')} {<-gt>} {($ Id.VSub_DollarName '$MAXNUM')} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<exit_err>} { (DQ <'Cannot allocate additional glabel name for '> ($ Id.VSub_DollarName '$NAME') ) } ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [1316 1329] ) ] ) ] ) ) (C {<export>} {<Id.Lit_VarLike 'VAL='> (DQ (${ Id.VSub_Name NAME) (${ Id.VSub_Name NUM))} ) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: get_autosize body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:dTag) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [1384] ) ] ) (C {<get_disk_mediasize_mb>} {(DQ ($ Id.VSub_Number '$2'))}) (C {<local>} {<Id.Lit_VarLike '_aSize='> ($ Id.VSub_DollarName '$VAL')}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands:[(C {<read>} {<line>})]) body: (command.DoGroup children: [ (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$line')}) (command.Simple words: [{<grep>} {<-q>} {(DQ <'^'> (${ Id.VSub_Name _dTag) <'-part='>)}] 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 '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) terminator: <Id.Op_Semi _> ) ] spids: [1445 1459] ) ] ) (C {<get_value_from_string>} {(DQ (${ Id.VSub_Name line))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:STRING) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$VAL'))} spids: [1478] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SIZE) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$STRING')}) (C {<tr>} {<-s>} {(SQ <'\\t'>)} {(SQ <' '>)}) (C {<cut>} {<-d>} {(SQ <' '>)} {<-f>} {<2>}) ] negated: F ) ) } spids: [1489] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$SIZE')} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) terminator: <Id.Op_Semi _> ) ] spids: [1530 1544] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_aSize) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$_aSize')} {<->} {($ Id.VSub_DollarName '$SIZE')} ) ) } spids: [1553] ) ] ) ] ) redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(${ Id.VSub_Name CFGF)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_aSize) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<expr>} {($ Id.VSub_DollarName '$_aSize')} {<->} {<2>}) ) } spids: [1580] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:VAL) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$_aSize'))} spids: [1595] ) ] ) (C {<export>} {<VAL>}) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: setup_gpart_partitions body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike '_dTag='> (DQ ($ Id.VSub_Number '$1'))}) (C {<local>} {<Id.Lit_VarLike '_pDisk='> (DQ ($ Id.VSub_Number '$2'))}) (C {<local>} {<Id.Lit_VarLike '_wSlice='> (DQ ($ Id.VSub_Number '$3'))}) (C {<local>} {<Id.Lit_VarLike '_sNum='> (DQ ($ Id.VSub_Number '$4'))}) (C {<local>} {<Id.Lit_VarLike '_pType='> (DQ ($ Id.VSub_Number '$5'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FOUNDPARTS) op: assign_op.Equal rhs: {(DQ <1>)} spids: [1659] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:USEDAUTOSIZE) op: assign_op.Equal rhs: {<0>} spids: [1665] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CURPART) op: assign_op.Equal rhs: {(DQ <2>)} spids: [1697] ) ] ) ] spids: [1674 1694] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <apm>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CURPART) op: assign_op.Equal rhs: {(DQ <3>)} spids: [1726] ) ] ) ] spids: [1703 1723] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTLETTER) op: assign_op.Equal rhs: {(DQ <a>)} spids: [1735] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CURPART) op: assign_op.Equal rhs: {(DQ <1>)} spids: [1741] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <mbr>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<rc_halt>} {(DQ <'gpart create -s BSD '> (${ Id.VSub_Name _wSlice))}) ] spids: [1747 1767] ) ] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands:[(C {<read>} {<line>})]) body: (command.DoGroup children: [ (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$line')}) (command.Simple words: [{<grep>} {<-q>} {(DQ <'^'> (${ Id.VSub_Name _dTag) <'-part='>)}] 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.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FOUNDPARTS) op: assign_op.Equal rhs: {(DQ <0>)} spids: [1839] ) ] ) (C {<get_value_from_string>} {(DQ (${ Id.VSub_Name line))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:STRING) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$VAL'))} spids: [1858] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FS) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$STRING')}) (C {<tr>} {<-s>} {(SQ <'\\t'>)} {(SQ <' '>)}) (C {<cut>} {<-d>} {(SQ <' '>)} {<-f>} {<1>}) ] negated: F ) ) } spids: [1869] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SIZE) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$STRING')}) (C {<tr>} {<-s>} {(SQ <'\\t'>)} {(SQ <' '>)}) (C {<cut>} {<-d>} {(SQ <' '>)} {<-f>} {<2>}) ] negated: F ) ) } spids: [1910] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MNT) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$STRING')}) (C {<tr>} {<-s>} {(SQ <'\\t'>)} {(SQ <' '>)}) (C {<cut>} {<-d>} {(SQ <' '>)} {<-f>} {<3>}) ] negated: F ) ) } spids: [1951] ) ] ) (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Name FS)}) (command.Simple words: [{<grep>} {<-q>} {(DQ <.eli>)}] 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.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FS) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Name FS)}) (C {<cut>} {<-d>} {(SQ <.>)} {<-f>} {<1>}) ] negated: F ) ) ) } spids: [2033] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ENC) op: assign_op.Equal rhs: {(DQ <ON>)} spids: [2061] ) ] ) (C {<check_for_enc_pass>} {(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 VAL))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ )} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ENCPASS) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name VAL))} spids: [2103] ) ] ) ] spids: [2076 2096] ) ] ) ] spids: [2017 2030] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ENC) op: assign_op.Equal rhs: {(DQ <OFF>)} spids: [2118] ) ] ) ] ) (C {<check_for_mount>} {(DQ (${ Id.VSub_Name MNT))} {(DQ <'/'>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<-a>} {(DQ (${ Id.VSub_Name ENC))} {<Id.Lit_Equals '='>} {(DQ <ON>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<export>} {<Id.Lit_VarLike 'USINGENCROOT='> (DQ <0>)}) ] spids: [2145 2172] ) ] ) (command.Case to_match: {($ Id.VSub_DollarName '$FS')} arms: [ (case_arm pat_list: [ {<UFS>} {<UFS> <Id.Lit_Other '+'> <S>} {<UFS> <Id.Lit_Other '+'> <J>} {<UFS> <Id.Lit_Other '+'> <SUJ>} {<ZFS>} {<SWAP>} ] spids: [2199 2216 2218 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<exit_err>} { (DQ <'ERROR: Invalid file system specified on '> ($ Id.VSub_DollarName '$line') ) } ) ] spids: [2221 2222 2231 -1] ) ] ) (command.Simple words: [ {<expr>} {($ Id.VSub_DollarName '$SIZE')} {<Id.Lit_Other '+'>} {<1>} ] 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 '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ <'ERROR: The size specified on '> ($ Id.VSub_DollarName '$line') <' is invalid'> ) } ) ] spids: [2257 2270] ) ] ) (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$MNT'))}) (command.Simple words: [{<grep>} {<-qe>} {(DQ <'^/'>)} {<-e>} {(DQ <'^none'>)}] 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 '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ <'ERROR: The mount-point specified on '> ($ Id.VSub_DollarName '$line') <' is invalid'> ) } ) ] spids: [2316 2329] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$SIZE'))} {<Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_DollarName '$USEDAUTOSIZE')} {<-eq>} {<1>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ < 'ERROR: You can not have two partitions with a size of 0 specified!' > ) } ) ] spids: [2365 2379] ) ] ) (command.Case to_match: {(${ Id.VSub_Name _pType)} arms: [ (case_arm pat_list: [{<gpt>} {<apm>}] action: [ (C {<get_autosize>} {(DQ (${ Id.VSub_Name _dTag))} {(DQ ($ Id.VSub_DollarName '$_pDisk'))} ) ] spids: [2401 2404 2418 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<get_autosize>} {(DQ (${ Id.VSub_Name _dTag))} {(DQ ($ Id.VSub_DollarName '$_wSlice'))} ) ] spids: [2421 2422 2436 -1] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SOUT) op: assign_op.Equal rhs: {(DQ <'-s '> (${ Id.VSub_Name VAL) <M>)} spids: [2442] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:USEDAUTOSIZE) op: assign_op.Equal rhs: {<1>} spids: [2452] ) ] ) ] spids: [2345 2362] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SOUT) op: assign_op.Equal rhs: {(DQ <'-s '> (${ Id.VSub_Name SIZE) <M>)} spids: [2459] ) ] ) ] ) (C {<check_for_mount>} {(DQ (${ Id.VSub_Name MNT))} {(DQ <'/'>)}) (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 'FOUNDROOT='> (DQ <1>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name CURPART))} {<Id.Lit_Equals '='>} {(DQ <2>)} {<-a>} {(DQ ($ Id.VSub_DollarName '$_pType'))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<export>} {<Id.Lit_VarLike 'FOUNDROOT='> (DQ <0>)}) ] spids: [2515 2547] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name CURPART))} {<Id.Lit_Equals '='>} {(DQ <3>)} {<-a>} {(DQ ($ Id.VSub_DollarName '$_pType'))} {<Id.Lit_Equals '='>} {(DQ <apm>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<export>} {<Id.Lit_VarLike 'FOUNDROOT='> (DQ <0>)}) ] spids: [2561 2593] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name CURPART))} {<Id.Lit_Equals '='>} {(DQ <1>)} {<-a>} {(DQ ($ Id.VSub_DollarName '$_pType'))} {<Id.Lit_Equals '='>} {(DQ <mbr>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<export>} {<Id.Lit_VarLike 'FOUNDROOT='> (DQ <0>)}) ] spids: [2607 2639] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name CURPART))} {<Id.Lit_Equals '='>} {(DQ <1>)} {<-a>} {(DQ ($ Id.VSub_DollarName '$_pType'))} {<Id.Lit_Equals '='>} {(DQ <gptslice>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<export>} {<Id.Lit_VarLike 'FOUNDROOT='> (DQ <0>)}) ] spids: [2653 2685] ) ] ) ] spids: [2490 2504] ) ] ) (C {<check_for_mount>} {(DQ (${ Id.VSub_Name MNT))} {(DQ <'/boot'>)}) (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 'USINGBOOTPART='> (DQ <0>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name CURPART))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <2>)} {<-a>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} {(DQ <'/boot partition must be first partition'>)} ) ] spids: [2741 2776] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name CURPART))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <3>)} {<-a>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <apm>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} {(DQ <'/boot partition must be first partition'>)} ) ] spids: [2789 2824] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name CURPART))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <1>)} {<-a>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <mbr>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} {(DQ <'/boot partition must be first partition'>)} ) ] spids: [2837 2872] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name CURPART))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <1>)} {<-a>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <gptslice>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} {(DQ <'/boot partition must be first partition'>)} ) ] spids: [2885 2920] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name FS))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <UFS>)} {<-a>} {(DQ (${ Id.VSub_Name FS))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <'UFS+S'>)} {<-a>} {(DQ (${ Id.VSub_Name FS))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <'UFS+J'>)} {<-a>} {(DQ (${ Id.VSub_Name FS))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <'UFS+SUJ'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ <'/boot partition must be formatted with UFS'> ) } ) ] spids: [2934 3000] ) ] ) ] spids: [2716 2730] ) ] ) (C {<gen_glabel_name>} {(DQ (${ Id.VSub_Name MNT))} {(DQ (${ Id.VSub_Name FS))} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PLABEL) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name VAL))} spids: [3036] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<get_fs_line_xvars>} { (DQ (${ Id.VSub_Name _pDisk) <p> (${ Id.VSub_Name CURPART)) } {(DQ (${ Id.VSub_Name STRING))} ) ] spids: [3049 3069] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <apm>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<get_fs_line_xvars>} { (DQ (${ Id.VSub_Name _pDisk) <s> (${ Id.VSub_Name CURPART)) } {(DQ (${ Id.VSub_Name STRING))} ) ] spids: [3091 3111] ) ] else_action: [ (C {<get_fs_line_xvars>} {(DQ (${ Id.VSub_Name _wSlice) (${ Id.VSub_Name PARTLETTER))} {(DQ (${ Id.VSub_Name STRING))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:XTRAOPTS) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$VAR'))} spids: [3157] ) ] ) (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Name XTRAOPTS)}) (C {<grep>} {<-q>} {<-e>} {(DQ <mirror>)} {<-e>} {(DQ <raidz>)}) ] negated: F ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-eq>} {<0>} {<-a>} {(DQ ($ Id.VSub_DollarName '$FS'))} {<Id.Lit_Equals '='>} {(DQ <ZFS>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<-o>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <gptslice>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:XTRAOPTS) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<setup_zfs_mirror_parts>} { (DQ ($ Id.VSub_DollarName '$XTRAOPTS') ) } {(DQ (${ Id.VSub_Name _pDisk) <p> (${ Id.VSub_Name CURPART))} ) ) } spids: [3259] ) ] ) ] spids: [3222 3256] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <apm>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:XTRAOPTS) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<setup_zfs_mirror_parts>} { (DQ ($ Id.VSub_DollarName '$XTRAOPTS') ) } {(DQ (${ Id.VSub_Name _pDisk) <s> (${ Id.VSub_Name CURPART))} ) ) } spids: [3302] ) ] ) ] spids: [3279 3299] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:XTRAOPTS) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<setup_zfs_mirror_parts>} {(DQ ($ Id.VSub_DollarName '$XTRAOPTS'))} {(DQ (${ Id.VSub_Name _wSlice) (${ Id.VSub_Name PARTLETTER))} ) ) } spids: [3325] ) ] ) ] ) ] spids: [3193 3219] ) ] ) (command.Case to_match: {(${ Id.VSub_Name FS)} arms: [ (case_arm pat_list: [{<ZFS>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTYPE) op: assign_op.Equal rhs: {(DQ <freebsd-zfs>)} spids: [3367] ) ] ) ] spids: [3364 3365 3372 -1] ) (case_arm pat_list: [{<SWAP>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTYPE) op: assign_op.Equal rhs: {(DQ <freebsd-swap>)} spids: [3378] ) ] ) ] spids: [3375 3376 3383 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTYPE) op: assign_op.Equal rhs: {(DQ <freebsd-ufs>)} spids: [3389] ) ] ) ] spids: [3386 3387 3394 -1] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$CURPART'))} {<Id.Lit_Equals '='>} {(DQ <2>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sleep>} {<2>}) (C {<rc_halt>} { (DQ <'gpart add -a 4k '> (${ Id.VSub_Name SOUT) <' -t '> (${ Id.VSub_Name PARTYPE) <' '> (${ Id.VSub_Name _pDisk) ) } ) ] spids: [3428 3446] ) ] else_action: [ (C {<sleep>} {<2>}) (C {<rc_halt>} { (DQ <'gpart add '> (${ Id.VSub_Name SOUT) <' -t '> (${ Id.VSub_Name PARTYPE) <' '> (${ Id.VSub_Name _pDisk) ) } ) ] ) ] spids: [3405 3425] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <gptslice>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sleep>} {<2>}) (C {<rc_halt>} { (DQ <'gpart add '> (${ Id.VSub_Name SOUT) <' -t '> (${ Id.VSub_Name PARTYPE) <' '> (${ Id.VSub_Name _wSlice) ) } ) ] spids: [3505 3524] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <apm>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sleep>} {<2>}) (C {<rc_halt>} { (DQ <'gpart add '> (${ Id.VSub_Name SOUT) <' -t '> (${ Id.VSub_Name PARTYPE) <' '> (${ Id.VSub_Name _pDisk) ) } ) ] spids: [3550 3569] ) ] else_action: [ (C {<sleep>} {<2>}) (C {<rc_halt>} { (DQ <'gpart add '> (${ Id.VSub_Name SOUT) <' -t '> (${ Id.VSub_Name PARTYPE) <' -i '> (${ Id.VSub_Name CURPART) <' '> (${ Id.VSub_Name _wSlice) ) } ) ] ) (command.ForEach iter_name: TESTMNT iter_words: [ { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(${ Id.VSub_Name MNT)}) (C {<sed>} {(SQ <'s|,| |g'>)}) ] negated: F ) ) } ] 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 (${ Id.VSub_Name TESTMNT))} {<Id.Lit_Equals '='>} {(DQ <'/'>)} {<-a>} {<-z>} {(DQ (${ Id.VSub_Name BOOTTYPE))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BOOTTYPE) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name PARTYPE))} spids: [3694] ) ] ) ] spids: [3661 3691] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name TESTMNT))} {<Id.Lit_Equals '='>} {(DQ <'/boot'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BOOTTYPE) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name PARTYPE))} spids: [3730] ) ] ) ] spids: [3707 3727] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_dFile) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$_pDisk')} ) (C {<sed>} {(SQ <'s|/|-|g'>)}) ] negated: F ) ) ) } spids: [3775] ) ] ) (command.Simple words: [ {<echo>} { (DQ (${ Id.VSub_Name FS) <'#'> (${ Id.VSub_Name MNT) <'#'> (${ Id.VSub_Name ENC) <'#'> (${ Id.VSub_Name PLABEL) <'#GPT#'> (${ Id.VSub_Name XTRAOPTS) ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name PARTDIR) <'/'> (${ Id.VSub_Name _dFile) <p> (${ Id.VSub_Name CURPART) } ) ] do_fork: T ) (C {<sleep>} {<2>}) (command.Simple words: [ {<dd>} {<Id.Lit_VarLike 'if='> <'/dev/zero'>} {<Id.Lit_VarLike 'of='> (${ Id.VSub_Name _pDisk) <p> (${ Id.VSub_Name CURPART) } {<Id.Lit_VarLike 'count='> <2048>} ] redirects: [ (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 '['>} {<-n>} {(DQ (${ Id.VSub_Name ENCPASS))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ (${ Id.VSub_Name ENCPASS))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name PARTDIR) <'-enc/'> (${ Id.VSub_Name _dFile) <p> (${ Id.VSub_Name CURPART) <-encpass> } ) ] do_fork: T ) ] spids: [3869 3885] ) ] ) ] spids: [3752 3772] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name _pType))} {<Id.Lit_Equals '='>} {(DQ <apm>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_dFile) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$_pDisk')} ) (C {<sed>} {(SQ <'s|/|-|g'>)}) ] negated: F ) ) ) } spids: [3937] ) ] ) (command.Simple words: [ {<echo>} { (DQ (${ Id.VSub_Name FS) <'#'> (${ Id.VSub_Name MNT) <'#'> (${ Id.VSub_Name ENC) <'#'> (${ Id.VSub_Name PLABEL) <'#GPT#'> (${ Id.VSub_Name XTRAOPTS) ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name PARTDIR) <'/'> (${ Id.VSub_Name _dFile) <s> (${ Id.VSub_Name CURPART) } ) ] do_fork: T ) (C {<sleep>} {<2>}) (command.Simple words: [ {<dd>} {<Id.Lit_VarLike 'if='> <'/dev/zero'>} {<Id.Lit_VarLike 'of='> (${ Id.VSub_Name _pDisk) <s> (${ Id.VSub_Name CURPART) } {<Id.Lit_VarLike 'count='> <2048>} ] redirects: [ (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 '['>} {<-n>} {(DQ (${ Id.VSub_Name ENCPASS))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ (${ Id.VSub_Name ENCPASS))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name PARTDIR) <'-enc/'> (${ Id.VSub_Name _dFile) <s> (${ Id.VSub_Name CURPART) <-encpass> } ) ] do_fork: T ) ] spids: [4031 4047] ) ] ) ] spids: [3914 3934] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:_dFile) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$_wSlice')}) (C {<sed>} {(SQ <'s|/|-|g'>)}) ] negated: F ) ) ) } spids: [4083] ) ] ) (command.Simple words: [ {<echo>} { (DQ (${ Id.VSub_Name FS) <'#'> (${ Id.VSub_Name MNT) <'#'> (${ Id.VSub_Name ENC) <'#'> (${ Id.VSub_Name PLABEL) <'#MBR#'> (${ Id.VSub_Name XTRAOPTS) <'#'> (${ Id.VSub_Name IMAGE) ) } ] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name PARTDIR) <'/'> (${ Id.VSub_Name _dFile) (${ Id.VSub_Name PARTLETTER) } ) ] do_fork: T ) (C {<sleep>} {<2>}) (command.Simple words: [ {<dd>} {<Id.Lit_VarLike 'if='> <'/dev/zero'>} {<Id.Lit_VarLike 'of='> (${ Id.VSub_Name _wSlice) (${ Id.VSub_Name PARTLETTER) } {<Id.Lit_VarLike 'count='> <2048>} ] redirects: [ (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 '['>} {<-n>} {(DQ (${ Id.VSub_Name ENCPASS))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<echo>} {(DQ (${ Id.VSub_Name ENCPASS))}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(${ Id.VSub_Name PARTDIR) <'-enc/'> (${ Id.VSub_Name _dFile) (${ Id.VSub_Name PARTLETTER) <-encpass> } ) ] do_fork: T ) ] spids: [4178 4194] ) ] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$_pType'))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<-o>} {(DQ ($ Id.VSub_DollarName '$_pType'))} {<Id.Lit_Equals '='>} {(DQ <apm>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CURPART) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike CURPART> right: {<Id.Lit_Digits 1>} ) ) } spids: [4265] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Continue continue> ) ] spids: [4231 4261] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CURPART) op: assign_op.Equal rhs: { (word_part.ArithSub anode: (arith_expr.Binary op_id: Id.Arith_Plus left: <Id.Lit_ArithVarLike CURPART> right: {<Id.Lit_Digits 1>} ) ) } spids: [4288] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$CURPART'))} {<Id.Lit_Equals '='>} {(DQ <3>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Sentence child: (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CURPART) op: assign_op.Equal rhs: {(DQ <4>)} spids: [4317] ) ] ) terminator: <Id.Op_Semi _> ) ] spids: [4297 4315] ) ] ) ] ) (command.Case to_match: {(${ Id.VSub_Name PARTLETTER)} arms: [ (case_arm pat_list: [{<a>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTLETTER) op: assign_op.Equal rhs: {(DQ <b>)} spids: [4348] ) ] ) ] spids: [4345 4346 4353 -1] ) (case_arm pat_list: [{<b>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTLETTER) op: assign_op.Equal rhs: {(DQ <d>)} spids: [4359] ) ] ) ] spids: [4356 4357 4364 -1] ) (case_arm pat_list: [{<d>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTLETTER) op: assign_op.Equal rhs: {(DQ <e>)} spids: [4370] ) ] ) ] spids: [4367 4368 4375 -1] ) (case_arm pat_list: [{<e>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTLETTER) op: assign_op.Equal rhs: {(DQ <f>)} spids: [4381] ) ] ) ] spids: [4378 4379 4386 -1] ) (case_arm pat_list: [{<f>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTLETTER) op: assign_op.Equal rhs: {(DQ <g>)} spids: [4392] ) ] ) ] spids: [4389 4390 4397 -1] ) (case_arm pat_list: [{<g>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTLETTER) op: assign_op.Equal rhs: {(DQ <h>)} spids: [4403] ) ] ) ] spids: [4400 4401 4408 -1] ) (case_arm pat_list: [{<h>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTLETTER) op: assign_op.Equal rhs: {(DQ <ERR>)} spids: [4414] ) ] ) ] spids: [4411 4412 4419 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (C {<exit_err>} { (DQ < 'ERROR: bsdlabel only supports up to letter h for partitions.' > ) } ) ] spids: [4422 4423 4431 -1] ) ] ) ] spids: [1823 1836] ) ] ) (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$line')}) (command.Simple words: [{<grep>} {<-q>} {(DQ <'^commitDiskLabel'>)}] 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>} {<-a>} {(DQ (${ Id.VSub_Name FOUNDPARTS))} {<Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-z>} {(DQ (${ Id.VSub_Name BOOTTYPE))} {<-a>} {(DQ ($ Id.VSub_DollarName '$_pType'))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Case to_match: {(${ Id.VSub_Name BOOTTYPE)} arms: [ (case_arm pat_list: [{<freebsd-ufs>}] action: [ (C {<rc_halt>} { (DQ <'gpart bootcode -p /boot/gptboot -i 1 '> (${ Id.VSub_Name _pDisk) ) } ) ] spids: [4540 4541 4552 -1] ) (case_arm pat_list: [{<freebsd-zfs>}] action: [ (C {<rc_halt>} { (DQ <'gpart bootcode -p /boot/gptzfsboot -i 1 '> (${ Id.VSub_Name _pDisk) ) } ) ] spids: [4555 4556 4567 -1] ) ] ) ] spids: [4498 4528] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$_pType'))} {<Id.Lit_Equals '='>} {(DQ <mbr>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<rc_halt>} { (DQ <'gpart bootcode -b /boot/boot '> (${ Id.VSub_Name _wSlice) ) } ) ] spids: [4582 4600] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name CURPART))} {<Id.Lit_Equals '='>} {(DQ <1>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ < 'ERROR: commitDiskLabel was called without any partition entries for it!' > ) } ) ] spids: [4621 4641] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [4463 4490] ) ] ) ] ) redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(${ Id.VSub_Name CFGF)} ) ] ) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: populate_disk_label body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Number 1))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<exit_err>} {(DQ <'ERROR: populate_disk_label() called without argument!'>)}) ] spids: [4682 4697] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:diskid) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_Number '$1')}) (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<1>}) ] negated: F ) ) ) } spids: [4715] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:disk) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_Number '$1')}) (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<1>}) (C {<sed>} {(SQ <'s|-|/|g'>)}) ] negated: F ) ) ) } spids: [4742] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:slicenum) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_Number '$1')}) (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<2>}) ] negated: F ) ) ) } spids: [4777] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:type) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_Number '$1')}) (C {<cut>} {<-d>} {(SQ <':'>)} {<-f>} {<3>}) ] negated: F ) ) ) } spids: [4804] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$type'))} {<Id.Lit_Equals '='>} {(DQ <mbr>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:wrkslice) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name diskid) <s> (${ Id.VSub_Name slicenum))} spids: [4858] ) ] ) ] spids: [4837 4855] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$type'))} {<Id.Lit_Equals '='>} {(DQ <apm>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:wrkslice) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name diskid) <s> (${ Id.VSub_Name slicenum))} spids: [4894] ) ] ) ] spids: [4873 4891] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$type'))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<-o>} {(DQ ($ Id.VSub_DollarName '$type'))} {<Id.Lit_Equals '='>} {(DQ <gptslice>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:wrkslice) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name diskid) <p> (${ Id.VSub_Name slicenum))} spids: [4942] ) ] ) ] spids: [4909 4939] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-e>} { (DQ (${ Id.VSub_Name SLICECFGDIR) <'/'> (${ Id.VSub_Name wrkslice)) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ < 'ERROR: Missing SLICETAG data. This shouldn\'t happen - please let the developers know' > ) } ) ] spids: [4958 4980] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:disktag) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (C {<cat>} {(${ Id.VSub_Name SLICECFGDIR) <'/'> (${ Id.VSub_Name wrkslice)} ) ) ) } spids: [4994] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:slicedev) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$wrkslice')}) (C {<sed>} {(SQ <'s|-|/|g'>)}) ] negated: F ) ) ) } spids: [5012] ) ] ) (C {<setup_gpart_partitions>} {(DQ (${ Id.VSub_Name disktag))} {(DQ (${ Id.VSub_Name disk))} {(DQ (${ Id.VSub_Name slicedev))} {(DQ (${ Id.VSub_Name slicenum))} {(DQ (${ Id.VSub_Name type))} ) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: setup_disk_label body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name WORKINGSLICES))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ <'ERROR: No slices were setup! Please report this to the maintainers'> ) } ) ] spids: [5093 5108] ) ] ) (command.ForEach iter_name: i iter_words: [{($ Id.VSub_DollarName '$WORKINGSLICES')}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:disk) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$i')}) (C {<cut>} {<-d>} {(SQ <->)} {<-f>} {<1>}) ] negated: F ) ) ) } spids: [5138] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:pnum) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$i')}) (C {<cut>} {<-d>} {(SQ <->)} {<-f>} {<2>}) ] negated: F ) ) ) } spids: [5165] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:type) op: assign_op.Equal rhs: { (DQ (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$i')}) (C {<cut>} {<-d>} {(SQ <->)} {<-f>} {<3>}) ] negated: F ) ) ) } spids: [5192] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$type'))} {<Id.Lit_Equals '='>} {(DQ <mbr>)} {<-a>} {<Id.KW_Bang '!'>} {<-e>} {(DQ (${ Id.VSub_Name disk) <s> (${ Id.VSub_Name pnum))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ <'ERROR: The partition '> (${ Id.VSub_Name i) <' doesn\'t exist! gpart failure!'> ) } ) ] spids: [5219 5253] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$type'))} {<Id.Lit_Equals '='>} {(DQ <gpt>)} {<-a>} {<Id.KW_Bang '!'>} {<-e>} {(DQ (${ Id.VSub_Name disk) <p> (${ Id.VSub_Name pnum))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ <'ERROR: The partition '> (${ Id.VSub_Name i) <' doesn\'t exist! gpart failure!'> ) } ) ] spids: [5270 5304] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$type'))} {<Id.Lit_Equals '='>} {(DQ <apm>)} {<-a>} {<Id.KW_Bang '!'>} {<-e>} {(DQ (${ Id.VSub_Name disk) <s> (${ Id.VSub_Name pnum))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ <'ERROR: The partition '> (${ Id.VSub_Name i) <' doesn\'t exist! gpart failure!'> ) } ) ] spids: [5321 5355] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$type'))} {<Id.Lit_Equals '='>} {(DQ <gptslice>)} {<-a>} {<Id.KW_Bang '!'>} {<-e>} {(DQ (${ Id.VSub_Name disk) <p> (${ Id.VSub_Name pnum))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<exit_err>} { (DQ <'ERROR: The partition '> (${ Id.VSub_Name i) <' doesn\'t exist! gpart failure!'> ) } ) ] spids: [5372 5406] ) ] ) ] ) ) (C {<export>} {<Id.Lit_VarLike 'LABELLIST='> (DQ (${ Id.VSub_Name TMPDIR) <'/workingLabels'>)} ) (command.Simple words: [{<rm>} {($ Id.VSub_DollarName '$LABELLIST')}] 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 ) (C {<export>} {<Id.Lit_VarLike 'FOUNDROOT='> (DQ <-1>)}) (C {<export>} {<Id.Lit_VarLike 'USINGBOOTPART='> (DQ <1>)}) (C {<export>} {<Id.Lit_VarLike 'USINGENCROOT='> (DQ <1>)}) (command.Simple words: [{<rm>} {<-rf>} {(${ Id.VSub_Name PARTDIR)}] 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: [{<mkdir>} {<-p>} {(${ Id.VSub_Name PARTDIR)}] 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: [{<rm>} {<-rf>} {(${ Id.VSub_Name PARTDIR) <-enc>}] 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: [{<mkdir>} {<-p>} {(${ Id.VSub_Name PARTDIR) <-enc>}] 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.ForEach iter_name: i iter_words: [{($ Id.VSub_DollarName '$WORKINGSLICES')}] do_arg_iter: F body: (command.DoGroup children: [(C {<populate_disk_label>} {(DQ (${ Id.VSub_Name i))})] ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$FOUNDROOT'))} {<Id.Lit_Equals '='>} {(DQ <-1>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [(C {<exit_err>} {(DQ <'ERROR: No root (/) partition specified!!'>)})] spids: [5591 5608] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$FOUNDROOT'))} {<Id.Lit_Equals '='>} {(DQ <1>)} {<-a>} {(DQ (${ Id.VSub_Name USINGBOOTPART))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<exit_err>} {(DQ <'ERROR: (/) partition isn\'t first partition on disk!'>)}) ] spids: [5626 5658] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name USINGENCROOT))} {<Id.Lit_Equals '='>} {(DQ <0>)} {<-a>} {(DQ (${ Id.VSub_Name USINGBOOTPART))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <0>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<exit_err>} {(DQ <'ERROR: Can\'t encrypt (/) with no (/boot) partition!'>)}) ] spids: [5672 5706] ) ] ) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: check_fstab_mbr body: (BraceGroup children: [ (C {<local>} {<SLICE>}) (C {<local>} {<FSTAB>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_Number '$2'))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [5740 5753] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SLICE) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [5765] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FSTAB) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2') <'/etc/fstab'>)} spids: [5771] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ (${ Id.VSub_Name FSTAB))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTLETTER) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$SLICE'))}) (C {<sed>} {<-E>} {(SQ <'s|^.+([a-h])$|\\1|'>)}) ] negated: F ) ) } spids: [5797] ) ] ) (command.Pipeline children: [ (C {<cat>} {(DQ (${ Id.VSub_Name FSTAB))}) (C {<awk>} {(SQ <'{ print $2 }'>)}) (command.Simple words: [{<grep>} {<-qE>} {(SQ <'^/$'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] 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.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name PARTLETTER))} {<Id.Lit_Equals '='>} {(DQ <a>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FOUNDROOT) op: assign_op.Equal rhs: {(DQ <0>)} spids: [5890] ) ] ) ] spids: [5868 5887] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FOUNDROOT) op: assign_op.Equal rhs: {(DQ <1>)} spids: [5899] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ROOTIMAGE) op: assign_op.Equal rhs: {(DQ <1>)} spids: [5909] ) ] ) (C {<export>} {<FOUNDROOT>}) (C {<export>} {<ROOTIMAGE>}) ] spids: [5852 5865] ) ] ) (command.Pipeline children: [ (C {<cat>} {(DQ (${ Id.VSub_Name FSTAB))}) (C {<awk>} {(SQ <'{ print $2 }'>)}) (command.Simple words: [{<grep>} {<-qE>} {(SQ <'^/boot$'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] 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.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name PARTLETTER))} {<Id.Lit_Equals '='>} {(DQ <a>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:USINGBOOTPART) op: assign_op.Equal rhs: {(DQ <0>)} spids: [5998] ) ] ) ] spids: [5976 5995] ) ] else_action: [ (C {<exit_err>} {(DQ <'/boot partition must be first partition'>)}) ] ) (C {<export>} {<USINGBOOTPART>}) ] spids: [5960 5973] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [5779 5794] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: check_fstab_gpt body: (BraceGroup children: [ (C {<local>} {<SLICE>}) (C {<local>} {<FSTAB>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_Number '$2'))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [6063 6076] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SLICE) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [6088] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FSTAB) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2') <'/etc/fstab'>)} spids: [6094] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ (${ Id.VSub_Name FSTAB))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PARTNUMBER) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Pipeline children: [ (C {<echo>} {(DQ (${ Id.VSub_Name SLICE))}) (C {<sed>} {<-E>} {(SQ <'s|^.+p([0-9]*)$|\\1|'>)}) ] negated: F ) ) } spids: [6120] ) ] ) (command.Pipeline children: [ (C {<cat>} {(DQ (${ Id.VSub_Name FSTAB))}) (C {<awk>} {(SQ <'{ print $2 }'>)}) (command.Simple words: [{<grep>} {<-qE>} {(SQ <'^/$'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] 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.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name PARTNUMBER))} {<Id.Lit_Equals '='>} {(DQ <2>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FOUNDROOT) op: assign_op.Equal rhs: {(DQ <0>)} spids: [6215] ) ] ) ] spids: [6193 6212] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FOUNDROOT) op: assign_op.Equal rhs: {(DQ <1>)} spids: [6224] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ROOTIMAGE) op: assign_op.Equal rhs: {(DQ <1>)} spids: [6234] ) ] ) (C {<export>} {<FOUNDROOT>}) (C {<export>} {<ROOTIMAGE>}) ] spids: [6177 6190] ) ] ) (command.Pipeline children: [ (C {<cat>} {(DQ (${ Id.VSub_Name FSTAB))}) (C {<awk>} {(SQ <'{ print $2 }'>)}) (command.Simple words: [{<grep>} {<-qE>} {(SQ <'^/boot$'>)}] redirects: [ (redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] 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.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name PARTNUMBER))} {<Id.Lit_Equals '='>} {(DQ <2>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:USINGBOOTPART) op: assign_op.Equal rhs: {(DQ <0>)} spids: [6323] ) ] ) ] spids: [6301 6320] ) ] else_action: [ (C {<exit_err>} {(DQ <'/boot partition must be first partition'>)}) ] ) (C {<export>} {<USINGBOOTPART>}) ] spids: [6285 6298] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<0>} ) ] spids: [6102 6117] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] ) ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.ShFunction name: check_disk_layout body: (BraceGroup children: [ (C {<local>} {<SLICES>}) (C {<local>} {<TYPE>}) (C {<local>} {<DISK>}) (C {<local>} {<RES>}) (C {<local>} {<F>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:DISK) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [6404] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TYPE) op: assign_op.Equal rhs: {(DQ <MBR>)} spids: [6410] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ (${ Id.VSub_Name DISK))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {<1>} ) ] spids: [6417 6432] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SLICES_MBR) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [ {<ls>} {<'/dev/'> (${ Id.VSub_Name DISK) <Id.Lit_ArrayLhsOpen 's['> <1-4> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'> <Id.Lit_LBracket '['> <a-h> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'> } ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ) } spids: [6444] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SLICES_GPT) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [ {<ls>} {<'/dev/'> (${ Id.VSub_Name DISK) <Id.Lit_ArrayLhsOpen 'p['> <0-9> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'> } ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ) } spids: [6468] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SLICES_SLICE) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_Backtick '`'> child: (command.Simple words: [ {<ls>} {<'/dev/'> (${ Id.VSub_Name DISK) <Id.Lit_LBracket '['> <a-h> <Id.Lit_RBracket ']'> <Id.Lit_Star '*'> } ] redirects: [ (redir op: <Id.Redir_Great '2>'> loc: (redir_loc.Fd fd:2) arg: {<'/dev/null'>} ) ] do_fork: T ) ) } spids: [6488] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name SLICES_MBR))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SLICES) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name SLICES_MBR))} spids: [6527] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TYPE) op: assign_op.Equal rhs: {(DQ <MBR>)} spids: [6535] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RES) op: assign_op.Equal rhs: {<0>} spids: [6541] ) ] ) ] spids: [6509 6524] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name SLICES_GPT))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SLICES) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name SLICES_GPT))} spids: [6566] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TYPE) op: assign_op.Equal rhs: {(DQ <GPT>)} spids: [6574] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RES) op: assign_op.Equal rhs: {<0>} spids: [6580] ) ] ) ] spids: [6548 6563] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ (${ Id.VSub_Name SLICES_SLICE))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SLICES) op: assign_op.Equal rhs: {(DQ (${ Id.VSub_Name SLICES_SLICE))} spids: [6605] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TYPE) op: assign_op.Equal rhs: {(DQ <MBR>)} spids: [6613] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:RES) op: assign_op.Equal rhs: {<0>} spids: [6619] ) ] ) ] spids: [6587 6602] ) ] ) (command.ForEach iter_name: slice iter_words: [{(${ Id.VSub_Name SLICES)}] do_arg_iter: F body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:F) op: assign_op.Equal rhs: {<1>} spids: [6642] ) ] ) (command.Simple words: [{<mount>} {(${ Id.VSub_Name slice)} {<'/mnt'>}] redirects: [ (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: [ (C {<Id.Lit_LBracket '['>} {($ Id.VSub_QMark '$?')} {<-ne>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [(command.ControlFlow token:<Id.ControlFlow_Continue continue>)] spids: [6658 6671] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name TYPE))} {<Id.Lit_Equals '='>} {(DQ <MBR>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<check_fstab_mbr>} {(DQ (${ Id.VSub_Name slice))} {(DQ <'/mnt'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:F) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_QMark '$?'))} spids: [6717] ) ] ) ] spids: [6682 6701] ) (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ (${ Id.VSub_Name TYPE))} {<Id.Lit_Equals '='>} {(DQ <GPT>)} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<check_fstab_gpt>} {(DQ (${ Id.VSub_Name slice))} {(DQ <'/mnt'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:F) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_QMark '$?'))} spids: [6759] ) ] ) ] spids: [6724 6743] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(${ Id.VSub_Name F)} {<-eq>} {<0>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<umount>} {<'/mnt'>}) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [6770 6785] ) ] ) (C {<umount>} {<'/mnt'>}) ] ) ) (command.ControlFlow token: <Id.ControlFlow_Return return> arg_word: {(${ Id.VSub_Name RES)} ) ] ) ) terminator: <Id.Op_Semi _> ) ] )