(command.BraceGroup children: [ (command.ShAssignment pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:INPUT) op:assign_op.Equal rhs:{<0>} spids:[95])] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_EqualTilde left: {($ Id.VSub_Number '$1')} right: {<Id.Lit_Other '^'> <-> <Id.Lit_Other '?'> <Id.Lit_Other '['> <0-9> <Id.Lit_Other ']'> <Id.Lit_Other '+'> <Id.Lit_Other '$'> } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INPUT) op: assign_op.Equal rhs: {($ Id.VSub_Number '$1')} spids: [122] ) ] ) ] spids: [99 119] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {</DietPi/dietpi/func/dietpi-globals>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<.>} {</DietPi/dietpi/func/dietpi-globals>}) (C {<G_CHECK_ROOT_USER>}) (C {<export>} {<Id.Lit_VarLike 'G_PROGRAM_NAME='> (SQ <DietPi-Drive_Manager>)}) ] spids: [134 145] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {(DQ ($ Id.VSub_DollarName '$HOME')) </dietpi-globals>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<.>} {(DQ ($ Id.VSub_DollarName '$HOME')) </dietpi-globals>}) (C {<G_CHECK_ROOT_USER>}) (C {<export>} {<Id.Lit_VarLike 'G_PROGRAM_NAME='> (SQ <DietPi-Drive_Manager>)}) ] spids: [170 184] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EXIT_CODE) op: assign_op.Equal rhs: {<0>} spids: [216] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:PROGRAM_NAME) op: assign_op.Equal rhs: {(SQ <'DietPi-Drive Manager'>)} spids: [221] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SERVICE_CONTROL) op: assign_op.Equal rhs: {<1>} spids: [232] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_DRIVE_MANAGER_SELECTION) op: assign_op.Equal rhs: {(SQ </tmp/dietpi-drive_manager_selmnt>)} spids: [241] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_TEMP_FSTAB) op: assign_op.Equal rhs: {(SQ </tmp/.fstab>)} spids: [252] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_ROOTFS_SOURCE) op: assign_op.Equal rhs: {<0>} spids: [259] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MAX_DRIVES) op: assign_op.Equal rhs: {<0>} spids: [268] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_GPT) op: assign_op.Equal rhs: {<1>} spids: [272] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_FILESYSTEM_TYPE) op: assign_op.Equal rhs: {<0>} spids: [279] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_RECREATE_PARTITION_TABLE) op: assign_op.Equal rhs: {<1>} spids: [286] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_COMPLETED) op: assign_op.Equal rhs: {<0>} spids: [293] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_PREVIOUS_MOUNT_SOURCE) op: assign_op.Equal rhs: {<0>} spids: [297] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INDEX_DRIVE_BEING_EDITED) op: assign_op.Equal rhs: {<0>} spids: [305] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ROOTFS_RW_CHECKED) op: assign_op.Equal rhs: {<0>} spids: [310] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_UUID) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [315] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_PART_UUID) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [320] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_MOUNT_SOURCE) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [325] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_MOUNT_TARGET) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [330] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_FSTYPE) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [335] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_SIZE_TOTAL) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [340] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_SIZE_USED) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [345] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_SIZE_PERCENTUSED) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [350] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_SIZE_FREE) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [355] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_ISAVAILABLE) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [361] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_ISFILESYSTEM) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [366] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_ISMOUNTED) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [371] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_ISUUIDMOUNT) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [376] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_ISREADONLY_FSTAB) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [381] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:aDRIVE_ISREADONLY_CURRENTLY) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [386] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INIT_FSTAB_SLOTS_ENABLED) op: assign_op.Equal rhs: {<0>} spids: [392] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_USERDATA_CURRENT) op: assign_op.Equal rhs: {<0>} spids: [397] ) ] ) (command.ShFunction name: Destroy body: (command.BraceGroup children: [ (C {<unset>} {<aDRIVE_MOUNT_SOURCE>}) (C {<unset>} {<aDRIVE_MOUNT_TARGET>}) (C {<unset>} {<aDRIVE_FSTYPE>}) (C {<unset>} {<aDRIVE_SIZE_TOTAL>}) (C {<unset>} {<aDRIVE_SIZE_USED>}) (C {<unset>} {<aDRIVE_SIZE_PERCENTUSED>}) (C {<unset>} {<aDRIVE_SIZE_FREE>}) (C {<unset>} {<aDRIVE_PART_UUID>}) (C {<unset>} {<aDRIVE_UUID>}) (C {<unset>} {<aDRIVE_ISMOUNTED>}) (C {<unset>} {<aDRIVE_ISFILESYSTEM>}) (C {<unset>} {<aDRIVE_ISAVAILABLE>}) (C {<unset>} {<aDRIVE_ISUUIDMOUNT>}) (C {<unset>} {<aDRIVE_ISREADONLY_FSTAB>}) (C {<unset>} {<aDRIVE_ISREADONLY_CURRENTLY>}) ] ) ) (command.ShFunction name: Init_Drives_and_Refresh body: (command.BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'init='> <1>}) (command.WhileUntil keyword: <Id.KW_While while> cond: [(command.DParen child:(arith_expr.ArithWord w:{($ Id.VSub_DollarName '$init')}))] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:init) op: assign_op.Equal rhs: {<0>} spids: [526] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} {(DQ <'Detecting drives, please wait...'>)}) (C {<cp>} {</etc/fstab>} {(DQ ($ Id.VSub_DollarName '$FP_TEMP_FSTAB'))}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MAX_DRIVES) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [(C {<blkid>} {<-o>} {<device>}) (C {<wc>} {<-l>})] negated: F ) ] ) ) } spids: [559] ) ] ) (C {<local>} {<Id.Lit_VarLike 'fp_temp='> (SQ </tmp/.dietpi-drive_manager_devlist>)}) (command.Simple words: [{<blkid>} {<-o>} {<device>}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {($ Id.VSub_DollarName '$fp_temp')} ) ] ) (command.Simple words: [{<readarray>} {<-t>} {<aDRIVE_MOUNT_SOURCE>}] redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {($ Id.VSub_DollarName '$fp_temp')} ) ] ) (command.Simple words: [{<blkid>} {<-s>} {<UUID>} {<-o>} {<value>}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {($ Id.VSub_DollarName '$fp_temp')} ) ] ) (command.Simple words: [{<readarray>} {<-t>} {<aDRIVE_UUID>}] redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {($ Id.VSub_DollarName '$fp_temp')} ) ] ) (command.Simple words: [{<blkid>} {<-s>} {<PARTUUID>} {<-o>} {<value>}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {($ Id.VSub_DollarName '$fp_temp')} ) ] ) (command.Simple words: [{<readarray>} {<-t>} {<aDRIVE_PART_UUID>}] redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {($ Id.VSub_DollarName '$fp_temp')} ) ] ) (command.Simple words: [{<blkid>} {<-s>} {<TYPE>} {<-o>} {<value>}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {($ Id.VSub_DollarName '$fp_temp')} ) ] ) (command.Simple words: [{<readarray>} {<-t>} {<aDRIVE_FSTYPE>}] redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {($ Id.VSub_DollarName '$fp_temp')} ) ] ) (C {<local>} {<Id.Lit_VarLike 'mount_index='> <1>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>) right: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$MAX_DRIVES')}) ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISAVAILABLE index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {<0>} spids: [732] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISUUIDMOUNT index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {<0>} spids: [740] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_MOUNT_TARGET index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {(SQ <NULL>)} spids: [748] ) ] ) (C {<local>} {<Id.Lit_VarLike 'drive_mount_target_dev='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<grep>} {<-m1>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <'[[:space:]]'> ) } {(DQ ($ Id.VSub_DollarName '$FP_TEMP_FSTAB'))} ) (C {<awk>} {(SQ <'{print $2}'>)}) ] negated: F ) ] ) ) } ) (C {<local>} {<Id.Lit_VarLike 'drive_mount_target_uuid='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<grep>} {<-m1>} { (DQ <'UUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <'[[:space:]]'> ) } {(DQ ($ Id.VSub_DollarName '$FP_TEMP_FSTAB'))} ) (C {<awk>} {(SQ <'{print $2}'>)}) ] negated: F ) ] ) ) } ) (C {<local>} {<Id.Lit_VarLike 'drive_mount_target_partuuid='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<grep>} {<-m1>} { (DQ <'PARTUUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_PART_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <'[[:space:]]'> ) } {(DQ ($ Id.VSub_DollarName '$FP_TEMP_FSTAB'))} ) (C {<awk>} {(SQ <'{print $2}'>)}) ] negated: F ) ] ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$drive_mount_target_dev'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_MOUNT_TARGET index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$drive_mount_target_dev')} spids: [879] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISAVAILABLE index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [887] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Detected /dev mount: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' > '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } ) ] spids: [862 875] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$drive_mount_target_uuid'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_MOUNT_TARGET index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$drive_mount_target_uuid')} spids: [940] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISAVAILABLE index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [949] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISUUIDMOUNT index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [957] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Detected UUID mount: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' > '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } ) ] spids: [923 936] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$drive_mount_target_partuuid'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_MOUNT_TARGET index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$drive_mount_target_partuuid')} spids: [1010] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISAVAILABLE index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [1019] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISUUIDMOUNT index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [1027] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Detected PARTUUID mount: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' > '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } ) ] spids: [993 1006] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_MOUNT_TARGET index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: { (DQ </mnt/> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } spids: [1088] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Creating UUID fstab entry: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<Id.Lit_Equals '='>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<findmnt>} {</>} {<-o>} {<source>} {<-n>} ) ] ) ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_MOUNT_TARGET index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {(SQ </>)} spids: [1165] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ < ' - Drive is currently mounted, using existing mount location: ' > (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } ) ] spids: [1129 1161] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-P>}) (C {<grep>} {<-ci>} {<-m1>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE > bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$i' ) } ) ) ) <'[[:space:]]'> ) } ) ] negated: F ) ] ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ < ' - Drive is currently mounted, using existing mount location: ' > (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_MOUNT_TARGET index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-P>}) (C {<grep>} {<-m1>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE > bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$i' ) } ) ) ) <'[[:space:]]'> ) } ) (C {<awk>} {(SQ <'{print $NF}'>)}) ] negated: F ) ] ) ) } spids: [1248] ) ] ) ] spids: [1196 1228] ) ] ) (C {<sed>} {<-i>} { (DQ <Id.Lit_Other '\\'> <'@^'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <'[[:space:]]@d'> ) } {(DQ ($ Id.VSub_DollarName '$FP_TEMP_FSTAB'))} ) (C {<sed>} {<-i>} { (DQ <Id.Lit_Other '\\'> <'@^UUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <'[[:space:]]@d'> ) } {(DQ ($ Id.VSub_DollarName '$FP_TEMP_FSTAB'))} ) (C {<local>} {<Id.Lit_VarLike 'mount_options='> (SQ <'defaults,noatime,nofail'>) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(SQ </>)} {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(SQ </boot>)} {<Id.Lit_RBracket ']'>} ) ] ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:mount_options) op: assign_op.PlusEqual rhs: {(SQ <',x-systemd.automount'>)} spids: [1407] ) ] ) ] spids: [1357 1403] ) ] ) (command.Simple words: [ {<echo>} {<-e>} { (DQ <'UUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' auto '> ($ Id.VSub_DollarName '$mount_options') <' 0 0'> ) } ] redirects: [ (redir.Redir op: <Id.Redir_DGreat '>>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$FP_TEMP_FSTAB'))} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISAVAILABLE index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [1450] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISUUIDMOUNT index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [1458] ) ] ) ] spids: [1063 1081] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DParen child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISAVAILABLE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) } ) ) (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<Id.Lit_RBracket ']'>} ) ] ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Creating mount folder for '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } ) (C {<mkdir>} {<-p>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } ) ] spids: [1475 1510] ) ] ) ] ) ) (C {<cp>} {(DQ ($ Id.VSub_DollarName '$FP_TEMP_FSTAB'))} {</etc/fstab>}) (C {<systemctl>} {<daemon-reload>}) (C {<rm>} {(DQ ($ Id.VSub_DollarName '$FP_TEMP_FSTAB'))}) (C {<mount>} {<-a>}) (C {<G_DIETPI-NOTIFY>} {<2>} {(DQ <'Processing drive information, please wait...'>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_ROOTFS_SOURCE) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-P>}) (C {<grep>} {<-m1>} {(SQ <'[[:space:]]/$'>)}) (C {<awk>} {(SQ <'{print $1}'>)}) ] negated: F ) ] ) ) } spids: [1600] ) ] ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>) right: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$MAX_DRIVES')}) ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_FSTYPE index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {(SQ <'No filesystem'>)} spids: [1657] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_SIZE_TOTAL index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {(SQ <NULL>)} spids: [1667] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_SIZE_USED index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {(SQ <NULL>)} spids: [1677] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_SIZE_FREE index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {(SQ <NULL>)} spids: [1687] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_SIZE_PERCENTUSED index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {(SQ <NULL>)} spids: [1697] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISMOUNTED index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {<0>} spids: [1708] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISFILESYSTEM index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {<0>} spids: [1716] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISREADONLY_FSTAB index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {<0>} spids: [1724] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISREADONLY_CURRENTLY index: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$i')}) ) op: assign_op.Equal rhs: {<0>} spids: [1732] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd_scrape_string) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<blkid>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<-s>} {<TYPE>} {<-o>} {<value>} ) ] ) ) } spids: [1741] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISFILESYSTEM index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [1781] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_FSTYPE index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} spids: [1789] ) ] ) ] spids: [1764 1777] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd_scrape_string) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-Ph>}) (C {<grep>} {<-m1>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <Id.Lit_Other '$'> ) } ) (C {<awk>} {(SQ <'{print $2}'>)}) ] negated: F ) ] ) ) } spids: [1808] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_SIZE_TOTAL index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} spids: [1857] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISMOUNTED index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [1867] ) ] ) ] spids: [1840 1853] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd_scrape_string) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-Ph>}) (C {<grep>} {<-m1>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <Id.Lit_Other '$'> ) } ) (C {<awk>} {(SQ <'{print $3}'>)}) ] negated: F ) ] ) ) } spids: [1880] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_SIZE_USED index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} spids: [1929] ) ] ) ] spids: [1912 1925] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd_scrape_string) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-Ph>}) (C {<grep>} {<-m1>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <Id.Lit_Other '$'> ) } ) (C {<awk>} {(SQ <'{print $4}'>)}) ] negated: F ) ] ) ) } spids: [1944] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_SIZE_FREE index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} spids: [1993] ) ] ) ] spids: [1976 1989] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd_scrape_string) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-Ph>}) (C {<grep>} {<-m1>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <Id.Lit_Other '$'> ) } ) (C {<awk>} {(SQ <'{print $5}'>)}) ] negated: F ) ] ) ) } spids: [2008] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_SIZE_PERCENTUSED index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} spids: [2057] ) ] ) ] spids: [2040 2053] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd_scrape_string) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<grep>} {<-m1>} { (DQ <'[[:space:]]'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <'[[:space:]]'> ) } {</etc/fstab>} ) (C {<grep>} {<-m1>} {(SQ <',ro,'>)}) ] negated: F ) ] ) ) } spids: [2072] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISREADONLY_FSTAB index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [2120] ) ] ) ] spids: [2103 2116] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:cmd_scrape_string) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<grep>} { (DQ <'[[:space:]]'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <'[[:space:]]'> ) } {</proc/mounts>} ) (C {<grep>} {<-m1>} {(SQ <'[[:space:]]ro,'>)}) ] negated: F ) ] ) ) } spids: [2149] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$cmd_scrape_string'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.IndexedName name: aDRIVE_ISREADONLY_CURRENTLY index: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) op: assign_op.Equal rhs: {<1>} spids: [2195] ) ] ) ] spids: [2178 2191] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$ROOTFS_RW_CHECKED')} ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ROOTFS_RW_CHECKED) op: assign_op.Equal rhs: {<1>} spids: [2232] ) ] ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>) right: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$MAX_DRIVES')} ) ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<Id.Lit_Equals '='>} {(DQ </>)} {<Id.Lit_RBracket ']'>} ) (command.DParen child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISREADONLY_CURRENTLY > bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$i' ) } ) ) ) } ) ) ] ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name: INDEX_DRIVE_BEING_EDITED ) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$i')} spids: [2301] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'RootFS is currently set to R/O. '> ($ Id.VSub_DollarName '$PROGRAM_NAME') <' requires R/W access.'> ) } ) (C {<whiptail>} {<--title>} {(DQ <'RootFS is R/O'>)} {<--yesno>} { (DQ < "RootFS is currently set to 'Read Only'. DietPi-Drive_Manager requires 'Read Write' access to function." > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> < "nWould you like to renable 'Read Write' access on RootFS?" > ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<--defaultno>} {<14>} {<75>} ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_QMark '$?')} ) right: (arith_expr.ArithWord w: {<Id.Lit_Digits 0>} ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<Toggle_WriteMode>}) (C {<G_DIETPI-NOTIFY>} {<0>} {(DQ <'RootFS R/W now enabled.'>)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:init) op: assign_op.Equal rhs: {<1>} spids: [2384] ) ] ) ] spids: [2349 2363] ) ] else_action: [ (C {</DietPi/dietpi/dietpi-services>} {<start>}) (C {<G_DIETPI-NOTIFY>} {<0>} {(DQ <'RootFS currently set to R/O.'>)} ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ < "Please run 'dietpi-drive_manager' again, if you want to re-enable RootFS R/W." > ) } ) (C {<Destroy>}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> ) ] ) ] spids: [2260 2297] ) ] ) ] ) ) ] spids: [2216 2228] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_USERDATA_CURRENT) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<readlink>} {<-f>} {($ Id.VSub_DollarName '$G_FP_DIETPI_USERDATA')} ) ] ) ) } spids: [2445] ) ] ) ] ) ) ] ) ) (command.ShFunction name: Return_Drive_Without_Partitions body: (command.BraceGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: {($ Id.VSub_Number '$1')} right: {</dev/sd> <Id.Lit_Other '*'>} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Pipeline children: [ (C {<echo>} {<-e>} {(DQ ($ Id.VSub_Number '$1'))}) (C {<sed>} {(SQ <'s/[0-9]$//g'>)}) ] negated: F ) ] spids: [2475 2489] ) ] else_action: [ (command.Pipeline children: [ (C {<echo>} {<-e>} {(DQ ($ Id.VSub_Number '$1'))}) (C {<sed>} {(SQ <'s/p[0-9]$//g'>)}) ] negated: F ) ] ) ] ) ) (command.ShFunction name: Run_Format body: (command.BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'drivepath_no_partitions='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<Return_Drive_Without_Partitions>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) ] ) ) } ) (C {<umount>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_RECREATE_PARTITION_TABLE')} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<dd>} {<Id.Lit_VarLike 'if='> </dev/zero>} {<Id.Lit_VarLike 'of='> ($ Id.VSub_DollarName '$drivepath_no_partitions')} {<Id.Lit_VarLike 'bs='> <5M>} {<Id.Lit_VarLike 'count='> <1>} ) (C {<local>} {<Id.Lit_VarLike 'parition_table_type='> (SQ <msdos>)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_GPT')} ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:parition_table_type) op: assign_op.Equal rhs: {(SQ <gpt>)} spids: [2643] ) ] ) ] spids: [2629 2639] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Partition table target: '> ($ Id.VSub_DollarName '$parition_table_type')) } ) (C {<parted>} {<-s>} {(DQ ($ Id.VSub_DollarName '$drivepath_no_partitions'))} {<mklabel>} {(DQ ($ Id.VSub_DollarName '$parition_table_type'))} ) (C {<parted>} {<-a>} {<optimal>} {(DQ ($ Id.VSub_DollarName '$drivepath_no_partitions'))} {<mkpart>} {<primary>} {<0> <Id.Lit_Other '%'>} {<100> <Id.Lit_Other '%'>} ) (C {<sleep>} {<1>}) (C {<umount>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) ] spids: [2583 2593] ) ] else_action: [ (C {<dd>} {<Id.Lit_VarLike 'if='> </dev/zero>} {<Id.Lit_VarLike 'of='> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } {<Id.Lit_VarLike 'bs='> <5M>} {<Id.Lit_VarLike 'count='> <1>} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<mkfs.ext4>} {<-F>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) (C {<resize2fs>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) ] spids: [2772 2786] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<mkfs.ntfs>} {<-f>} {<-I>} {<-F>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) ] spids: [2821 2835] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 2>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<mkfs.vfat>} {<-I>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) ] spids: [2864 2878] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 3>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<mkfs.hfsplus>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) ] spids: [2903 2917] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 4>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<mkfs.btrfs>} {<-f>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) ] spids: [2936 2950] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 5>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<mkfs.f2fs>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) ] spids: [2975 2989] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 6>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<mkfs.exfat>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } ) ] spids: [3008 3022] ) ] ) (C {<rm>} {<-R>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) ) } ) (C {<sed>} {<-i>} { (DQ <Id.Lit_Other '\\'> <'@'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <'[[:space:]]@d'> ) } {</etc/fstab>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_COMPLETED) op: assign_op.Equal rhs: {<1>} spids: [3079] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_PREVIOUS_MOUNT_SOURCE) op: assign_op.Equal rhs: { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) } spids: [3083] ) ] ) (C {<Init_Drives_and_Refresh>}) ] ) ) (command.ShFunction name: RootFS_Move body: (command.BraceGroup children: [ (C {<cp>} {</etc/fstab>} {</etc/fstab.bak>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>) right: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$MAX_DRIVES')}) ) update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:(sh_lhs_expr.Name name:i)) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName '$FORMAT_PREVIOUS_MOUNT_SOURCE'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INDEX_DRIVE_BEING_EDITED) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$i')} spids: [3176] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [3150 3172] ) ] ) ] ) ) (C {<sed>} {<-i>} { (DQ <Id.Lit_Other '\\'> <'@'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <'[[:space:]]@d'> ) } {</etc/fstab>} ) (C {<sed>} {<-i>} { (DQ <Id.Lit_Other '\\'> <'@[[:space:]]/[[:space:]]@c UUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <' / auto defaults,noatime 0 1'> ) } {</etc/fstab>} ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<dpkg>} {<--get-selections>}) (C {<grep>} {<-ci>} {<-m1>} {(SQ <'^rsync[[[:space:]]'>)} ) ] negated: F ) ] ) ) } ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<2>} {(DQ <'Installing Rsync, please wait...'> <Id.Lit_Other '\\'> <n>)} ) (C {<sleep>} {<1>}) (C {<G_AGI>} {<rsync>}) ] spids: [3244 3272] ) ] ) (C {<rsync>} {<-paxv>} {<--exclude>} {(SQ <'/lost+found'>)} {</>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) ) </> } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_NEqual left: (arith_expr.ArithWord w:{($ Id.VSub_QMark '$?')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<1>} {(SQ <'Rsync has failed, RootFS transfer has been aborted.'>)} ) (C {<cp>} {</etc/fstab.bak>} {</etc/fstab>}) (C {<Destroy>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit>) ] spids: [3326 3340] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$G_HW_MODEL')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 10>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<local>} {<Id.Lit_VarLike 'rootfs_current='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<awk>} {(SQ <'{for(i=1;i<=NF;i++) {print $i} }'>)} {</boot/cmdline.txt>} ) (C {<grep>} {<-m1>} {(SQ <'root='>)}) ] negated: F ) ] ) ) } ) (C {<sed>} {<-i>} { (DQ <'s#'> ($ Id.VSub_DollarName '$rootfs_current') <'#root=PARTUUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_PART_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <'#g'> ) } {</boot/cmdline.txt>} ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<grep>} {<-ci>} {<-m1>} {(SQ <'[[:space:]]rootdelay='>)} {</boot/cmdline.txt>} ) ] ) ) } ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<sed>} {<-i>} {(DQ <'s#console=tty1#console=tty1 rootdelay=10#g'>)} {</boot/cmdline.txt>} ) ] spids: [3451 3475] ) ] ) (C {<local>} {<Id.Lit_VarLike 'rootfstype_current='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<awk>} {(SQ <'{for(i=1;i<=NF;i++) {print $i} }'>)} {</boot/cmdline.txt>} ) (C {<grep>} {<-m1>} {(SQ <'rootfstype='>)}) ] negated: F ) ] ) ) } ) (C {<sed>} {<-i>} { (DQ <'s#'> ($ Id.VSub_DollarName '$rootfstype_current') <'#rootfstype='> (braced_var_sub token: <Id.VSub_Name aDRIVE_FSTYPE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <'#g'> ) } {</boot/cmdline.txt>} ) ] spids: [3380 3394] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DPipe left: (arith_expr.Binary op_id: Id.Arith_DPipe left: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$G_HW_MODEL')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 10>}) ) right: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$G_HW_MODEL')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 11>}) ) ) right: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$G_HW_MODEL')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 12>}) ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<local>} {<Id.Lit_VarLike 'rootfs_current='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<awk>} {(SQ <'{for(i=1;i<=NF;i++) {print $i} }'>)} {</DietPi/boot.ini>} ) (C {<grep>} {<-m1>} {(SQ <'root='>)}) (C {<sed>} {(SQ <'s/\\"//'>)}) ] negated: F ) ] ) ) } ) (C {<sed>} {<-i>} { (DQ <'s#'> ($ Id.VSub_DollarName '$rootfs_current') <'#root=UUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <'#g'> ) } {</DietPi/boot.ini>} ) ] spids: [3548 3578] ) ] ) (C {<systemctl>} {<daemon-reload>}) (C {<whiptail>} {<--title>} {(DQ <'RootFS transfer completed'>)} {<--msgbox>} {(DQ <'RootFS transfer completed. Press enter to reboot system.'>)} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<8>} {<60>} ) (C {<reboot>}) ] ) ) (command.ShFunction name: RootFS_Low_Free_Space_Check body: (command.BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'free_space_limit='> <500>}) (C {<G_DIETPI-NOTIFY>} {<2>} {(SQ <'Checking available free space on RootFS, please wait...'>)} ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>) right: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$MAX_DRIVES')}) ) update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:(sh_lhs_expr.Name name:i)) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ </>)} {<Id.Lit_Equals '='>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INDEX_DRIVE_BEING_EDITED) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$i')} spids: [3764] ) ] ) (C {<local>} {<Id.Lit_VarLike 'free_space_current='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-B>} {<M>}) (C {<grep>} {<-m1>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <Id.Lit_Other '$'> ) } ) (C {<awk>} {(SQ <'{print $4}'>)}) (C {<sed>} {(SQ <'s/[^0-9]//g'>)}) ] negated: F ) ] ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$free_space_current')} ) right: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$free_space_limit')} ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<local>} {<Id.Lit_VarLike 'message='> (DQ <'Error:'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nAvailable free space on RootFS is low ('> ($ Id.VSub_DollarName '$free_space_current') < ' MB). To prevent potential issues due to running out of free space, this script will now be terminated.' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nPlease free up at least '> ($ Id.VSub_DollarName '$free_space_limit') <' MB of free space, then try again.'> ) } ) (C {<whiptail>} {<--title>} {(DQ <'Insufficient free space'>)} {<--msgbox>} {(DQ ($ Id.VSub_DollarName '$message'))} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<14>} {<70>} ) (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ <'Insufficient free space on RootFS. '> ($ Id.VSub_DollarName '$free_space_current') <' MB available, '> ($ Id.VSub_DollarName '$free_space_limit') <' MB required'> ) } ) (C {<G_DIETPI-NOTIFY>} {<1>} {(SQ <Aborting>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EXIT_CODE) op: assign_op.Equal rhs: {<1>} spids: [3910] ) ] ) ] spids: [3818 3832] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<0>} { (DQ ($ Id.VSub_DollarName '$free_space_current') <' MB available, '> ($ Id.VSub_DollarName '$free_space_limit') <' MB required'> ) } ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [3738 3760] ) ] ) ] ) ) ] ) ) (command.ShFunction name: RootFS_RW_Check body: (command.BraceGroup children: [ (C {<G_DIETPI-NOTIFY>} {<2>} {(DQ <'Checking RootFS R/W access. Please wait...'>)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<mount>}) (C {<grep>} {<-m1>} {(SQ <'[[:space:]]/[[:space:]]'>)}) (C {<grep>} {<-ci>} {<-m1>} {(SQ <'(ro,'>)}) ] negated: F ) ] ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<1>} {(DQ <'RootFS is currently set to R/O.'>)}) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ < "DietPi requires RootFS R/W access. Please run 'dietpi-drive_manager' to re-enable." > <Id.Lit_Other '\\'> <n> ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EXIT_CODE) op: assign_op.Equal rhs: {<1>} spids: [4063] ) ] ) ] spids: [4005 4039] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<0>} {(DQ <'RootFS R/W access.'> <Id.Lit_Other '\\'> <n>)}) ] ) ] ) ) (command.ShFunction name: Toggle_WriteMode body: (command.BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'line_number='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<grep>} {<-m1>} {<-n>} { (DQ <'[[:space:]]'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <'[[:space:]]'> ) } {</etc/fstab>} ) (C {<cut>} {<-f1>} {<-d> <Id.Lit_Other ':'>}) ] negated: F ) ] ) ) } ) (C {<local>} {<Id.Lit_VarLike 'exit_status='> <0>}) (C {<local>} {<Id.Lit_VarLike 'message_result='> <0>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DPipe left: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISREADONLY_FSTAB> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED') } ) ) ) } ) right: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISREADONLY_CURRENTLY> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED') } ) ) ) } ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:message_result) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<mount>} {<-v>} {<-o>} {<rw> <Id.Lit_Comma ','> <remount>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<1>} ) ] ) ] ) ) } spids: [4172] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:exit_status) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [4198] ) ] ) (C {<sed>} {<-i>} {(DQ (${ Id.VSub_Name line_number) <'s/[[:space:]]defaults,ro,/ defaults,/'>)} {</etc/fstab>} ) ] spids: [4144 4168] ) ] else_action: [ (C {<sed>} {<-i>} {(DQ (${ Id.VSub_Name line_number) <'s/[[:space:]]defaults,/ defaults,ro,/'>)} {</etc/fstab>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:message_result) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<mount>} {<-v>} {<-o>} {<ro> <Id.Lit_Comma ','> <remount>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<1>} ) ] ) ] ) ) } spids: [4241] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:exit_status) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [4267] ) ] ) ] ) (C {<systemctl>} {<daemon-reload>}) (C {<mount>} {<-a>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_NEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$exit_status')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Failed to apply now'>)} {<--msgbox>} { (DQ <'Due to:'> <Id.Lit_Other '\\'> <'n - '> ($ Id.VSub_DollarName '$message_result') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nIf you have set to read only, this will be active on next reboot.'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<14>} {<70>} ) ] spids: [4287 4301] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<0>} spids: [4346] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MENU_LASTITEM) op: assign_op.Equal rhs: {(SQ )} spids: [4350] ) ] ) (command.ShFunction name: Menu_Main_Drive_Manager body: (command.BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'whiptail_menu_array='> (sh_array_literal left:<Id.Op_LParen _>)} ) (C {<local>} {<Id.Lit_VarLike 'drive_available='> <0>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>) right: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$MAX_DRIVES')}) ) update: (arith_expr.UnaryAssign op_id:Id.Node_PostDPlus child:(sh_lhs_expr.Name name:i)) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:drive_available) op: assign_op.Equal rhs: {<1>} spids: [4408] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISAVAILABLE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<echo>} {<-e>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE > bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$i' ) } ) ) ) ) } ) (C {<grep>} {<-ci>} {<-m1>} {(SQ <'1$'>)}) ] negated: F ) ] ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<local>} {<Id.Lit_VarLike 'drivepath_no_partitions='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<Return_Drive_Without_Partitions>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) } ) ] ) ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(SQ )} { (DQ <'\xe2\x94\x80('> ($ Id.VSub_DollarName '$drivepath_no_partitions' ) < ')\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80' > ) } ] ) } spids: [4490] ) ] ) ] spids: [4436 4471] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISMOUNTED> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } { (DQ <': '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' | '> (braced_var_sub token: <Id.VSub_Name aDRIVE_FSTYPE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' | Size: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_SIZE_TOTAL> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' | Used: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_SIZE_USED> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' ('> (braced_var_sub token: <Id.VSub_Name aDRIVE_SIZE_PERCENTUSED> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <')'> ) } ] ) } spids: [4535] ) ] ) ] spids: [4512 4527] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISFILESYSTEM> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) } ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } { (DQ <': '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' | No filesystem / format required'> ) } ] ) } spids: [4621] ) ] ) ] spids: [4600 4617] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } { (DQ <': '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' | '> (braced_var_sub token: <Id.VSub_Name aDRIVE_FSTYPE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) <' | Not mounted'> ) } ] ) } spids: [4654] ) ] ) ] ) ] ) ] spids: [4413 4428] ) ] ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ )} { (DQ < '\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80' > ) } ] ) } spids: [4702] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$drive_available')} ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <Refresh>)} {(DQ <': No drives found. Insert a drive and select this option'>)} ] ) } spids: [4730] ) ] ) ] spids: [4714 4726] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [{(DQ <Refresh>)} {(DQ <': Scan for recently added/removed drives'>)}] ) } spids: [4747] ) ] ) ] ) (C {<local>} {<Id.Lit_VarLike 'userdata_location_text='> (DQ <'RootFS ('> ($ Id.VSub_DollarName '$FP_USERDATA_CURRENT') <')'>) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$FP_USERDATA_CURRENT'))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName '$G_FP_DIETPI_USERDATA'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:userdata_location_text) op: assign_op.Equal rhs: {(DQ <'USB ('> ($ Id.VSub_DollarName '$FP_USERDATA_CURRENT') <')'>)} spids: [4801] ) ] ) ] spids: [4779 4797] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} spids: [4814] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--menu>} { (DQ <'Please select a drive to see available options.'> <Id.Lit_Other '\\'> <'n - User data location: '> ($ Id.VSub_DollarName '$userdata_location_text') ) } {<--default-item>} {(DQ ($ Id.VSub_DollarName '$MENU_LASTITEM'))} {<--cancel-button>} {(DQ <Exit>)} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<20>} {<110>} {<11>} { (DQ (braced_var_sub token: <Id.VSub_Name whiptail_menu_array> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '3>&'> fd: 3 arg_word: {<1>} ) (redir.Redir op: <Id.Redir_GreatAnd '1>&'> fd: 1 arg_word: {<2>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<3>} ) ] ) ] ) ) } spids: [4820] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [4884] ) ] ) (C {<unset>} {<whiptail_menu_array>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$CHOICE')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MENU_LASTITEM) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTION'))} spids: [4913] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <Refresh>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Init_Drives_and_Refresh>})] spids: [4924 4941] ) ] else_action: [ (C {<Init_Drives_and_Refresh>}) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: (sh_lhs_expr.Name name:i) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.VarRef token:<Id.Lit_ArithVarLike i>) right: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$MAX_DRIVES')}) ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: (sh_lhs_expr.Name name:i) ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$i')} ) ) ) ) } {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISAVAILABLE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$i' ) } ) ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name: INDEX_DRIVE_BEING_EDITED ) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$i')} spids: [5037] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<1>} spids: [5041] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [5018 5033] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Info: No drive'>)} {<--msgbox>} {(DQ <'This drive is no longer available'>)} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<8>} {<60>} ) (command.ControlFlow token: <Id.ControlFlow_Break break> ) ] spids: [5049 5062] ) ] ) ] spids: [4988 5010] ) ] ) ] ) ) ] ) ] spids: [4895 4909] ) ] else_action: [(C {<Menu_Exit>})] ) ] ) ) (command.ShFunction name: Menu_Drive_Manager_Edit_Drive body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<1>} spids: [5142] ) ] ) (C {<local>} {<Id.Lit_VarLike 'partition_contains_userdata='> <0>}) (C {<local>} {<Id.Lit_VarLike 'whiptail_desc='> (sh_array_literal left:<Id.Op_LParen _>)}) (C {<local>} {<Id.Lit_VarLike 'whiptail_menu_array='> (sh_array_literal left:<Id.Op_LParen _>)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: { (DQ <'Mount target: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <Id.Lit_Other '\\'> <n> ) } spids: [5173] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: { (DQ <'Mount source: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <Id.Lit_Other '\\'> <n> ) } spids: [5187] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISFILESYSTEM> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED') } ) ) ) } ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: {(DQ <'Status: Drive has no filesystem and must be formatted'>)} spids: [5227] ) ] ) ] spids: [5206 5223] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISUUIDMOUNT> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED') } ) ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: { (DQ < "Mount method: UUID (Permanent: always mount to 'Mount Target')" > <Id.Lit_Other '\\'> <n> ) } spids: [5257] ) ] ) ] spids: [5238 5253] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: { (DQ < 'Mount method: /dev/sd (Warning: mount location not permanent, use UUID)' > <Id.Lit_Other '\\'> <n> ) } spids: [5270] ) ] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: { (DQ <'Filesystem: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_FSTYPE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <Id.Lit_Other '\\'> <n> ) } spids: [5283] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: { (DQ <'UUID: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <Id.Lit_Other '\\'> <n> ) } spids: [5297] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISMOUNTED> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED') } ) ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: { (DQ <'Capacity: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_SIZE_TOTAL> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <b> <Id.Lit_Other '\\'> <n> ) } spids: [5331] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: { (DQ <'Used: '> (braced_var_sub token: <Id.VSub_Name aDRIVE_SIZE_USED> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <'b ('> (braced_var_sub token: <Id.VSub_Name aDRIVE_SIZE_PERCENTUSED> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <')'> <Id.Lit_Other '\\'> <n> ) } spids: [5346] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: {(DQ <'Status: Drive is online and ready for use'>)} spids: [5368] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ </>)} {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ </boot>)} {<Id.Lit_RBracket ']'>} ) ] ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <Unmount>)} {(DQ <': Allows you to physically remove the drive'>)} ] ) } spids: [5428] ) ] ) ] spids: [5379 5424] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ </>)} {<Id.Lit_RBracket ']'>} ) (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobDEqual left: { ($ Id.VSub_DollarName '$FP_USERDATA_CURRENT' ) } right: { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET > bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) <Id.Lit_Other '*'> } ) ) ] ) ] ) ) (command.Subshell command_list: (command.CommandList children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) } {<Id.Lit_Equals '='>} {(DQ </>)} {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} { (DQ ($ Id.VSub_DollarName '$FP_USERDATA_CURRENT' ) ) } {<Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName '$G_FP_DIETPI_USERDATA'))} {<Id.Lit_RBracket ']'>} ) ] ) ] ) ) ] ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <'User data'>)} { (DQ < ': Your user data is currently located on this drive' > ) } ] ) } spids: [5544] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:partition_contains_userdata) op: assign_op.Equal rhs: {<1>} spids: [5556] ) ] ) ] spids: [5445 5537] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <'Move User data'>)} {(DQ <': Move your DietPi user data to this drive'>)} ] ) } spids: [5565] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISUUIDMOUNT> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <'Mount Method'>)} {(DQ <': Change from UUID to /dev/sd'>)} ] ) } spids: [5601] ) ] ) ] spids: [5582 5597] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <'Mount Method'>)} {(DQ <': Change from /dev/sd to UUID'>)} ] ) } spids: [5618] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DPipe left: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISREADONLY_FSTAB> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) } ) right: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISREADONLY_CURRENTLY> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) } ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <'Read Only'>)} {(DQ <': Enabled | Select to allow R/W'>)} ] ) } spids: [5667] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: {(DQ <Id.Lit_Other '\\'> <'nRead only: Enabled'>)} spids: [5679] ) ] ) ] spids: [5639 5663] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <'Read Only'>)} {(DQ <': Disabled | Select to set read only'>)} ] ) } spids: [5691] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: {(DQ <Id.Lit_Other '\\'> <'nRead only: Disabled'>)} spids: [5703] ) ] ) ] ) ] spids: [5312 5327] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_desc) op: assign_op.PlusEqual rhs: { (DQ <'Status: Drive is not mounted and can be unplugged'> <Id.Lit_Other '\\'> <n> ) } spids: [5720] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <Mount>)} { (DQ <': Mount the drive to '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED') } ) ) ) ) } ] ) } spids: [5729] ) ] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ </>)} {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ </boot>)} {<Id.Lit_RBracket ']'>} ) ] ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <Format>)} {(DQ <': Wipe all data and format drive with ext4'>)} ] ) } spids: [5809] ) ] ) ] spids: [5760 5805] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp] children: [ (command.DBracket expr: (bool_expr.Binary op_id: Id.BoolBinary_GlobNEqual left: { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED') } ) ) ) } right: {($ Id.VSub_DollarName '$FP_ROOTFS_SOURCE')} ) ) (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DPipe left: (arith_expr.Binary op_id: Id.Arith_DPipe left: (arith_expr.Binary op_id: Id.Arith_DPipe left: (arith_expr.Binary op_id: Id.Arith_Less left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$G_HW_MODEL')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 10>}) ) right: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$G_HW_MODEL')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 10>}) ) ) right: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$G_HW_MODEL')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 11>}) ) ) right: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$G_HW_MODEL')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 12>}) ) ) ) ] ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <'Transfer RootFS'>)} {(DQ <': Transfer RootFS to this drive'>)} ] ) } spids: [5890] ) ] ) ] spids: [5830 5886] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} spids: [5907] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--menu>} {(DQ ($ Id.VSub_DollarName '$whiptail_desc'))} {<--default-item>} {(DQ ($ Id.VSub_DollarName '$MENU_LASTITEM'))} {<--cancel-button>} {(DQ <Back>)} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<22>} {<90>} {<6>} { (DQ (braced_var_sub token: <Id.VSub_Name whiptail_menu_array> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '3>&'> fd: 3 arg_word: {<1>} ) (redir.Redir op: <Id.Redir_GreatAnd '1>&'> fd: 1 arg_word: {<2>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<3>} ) ] ) ] ) ) } spids: [5913] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [5974] ) ] ) (C {<unset>} {<whiptail_desc>}) (C {<unset>} {<whiptail_menu_array>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$CHOICE')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MENU_LASTITEM) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTION'))} spids: [6008] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <Mount>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<sed>} {<-i>} {<-e>} { (DQ <Id.Lit_Other '\\'> <'@'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <'[[:space:]]@s@^#@@'> ) } {</etc/fstab>} ) (C {<systemctl>} {<daemon-reload>}) (C {<mount>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) ) } ) ] spids: [6015 6032] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <Unmount>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$partition_contains_userdata' ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Info: dismount prevented'>)} {<--msgbox>} { (DQ < 'Your DietPi user data is currently located on this drive:' > <Id.Lit_Other '\\'> <'n - '> ($ Id.VSub_DollarName '$FP_USERDATA_CURRENT') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nDismounting the drive at this time is not possible.'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> < 'nPlease move your user data elsewhere, before trying again:' > <Id.Lit_Other '\\'> <'nhttp://dietpi.com/phpbb/viewtopic.php?f=8&t=478'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<13>} {<80>} ) ] spids: [6105 6115] ) ] else_action: [ (C {<umount>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED') } ) ) ) ) } ) (C {<sed>} {<-i>} {<-e>} { (DQ <Id.Lit_Other '\\'> <'@'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED') } ) ) ) <'[[:space:]]@s@^#*@#@'> ) } {</etc/fstab>} ) (C {<systemctl>} {<daemon-reload>}) ] ) ] spids: [6080 6097] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <'Mount Method'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) } {<Id.Lit_Equals '='>} {(DQ <NULL>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Error: No UUID'>)} {<--msgbox>} { (DQ < 'This drive does not have a UUID assigned. Unable to proceed.' > ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<8>} {<60>} ) ] spids: [6235 6257] ) ] else_action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (braced_var_sub token: <Id.VSub_Name aDRIVE_ISUUIDMOUNT> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<sed>} {<-i>} { (DQ <'s@^UUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) <'@'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) <'@g'> ) } {</etc/fstab>} ) ] spids: [6291 6306] ) ] else_action: [ (C {<sed>} {<-i>} { (DQ <'s@^'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) <'@UUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) <'@g'> ) } {</etc/fstab>} ) ] ) (C {<systemctl>} {<daemon-reload>}) ] ) ] spids: [6210 6227] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <'Move User data'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_FSTYPE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) } {<Id.Lit_Equals '='>} {(DQ <vfat>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Warning: FAT32'>)} {<--msgbox>} { (DQ <'Warning:'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> < 'nFAT32 does not support file and folder permissions. Some of the programs which use the DietPi user directory (eg: Owncloud data storage), rely on permissions to function correctly.' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> < 'nIf you continue with the DietPi user data move to this FAT32 drive, programs may have issues reading and writing data.' > ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<14>} {<70>} ) ] spids: [6405 6427] ) ] ) (C {<local>} {<Id.Lit_VarLike 'target_userdata_dir='> (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (DQ (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_TARGET> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) } {<Id.Lit_Equals '='>} {(DQ </>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:target_userdata_dir) op: assign_op.Equal rhs: {(SQ </mnt>)} spids: [6512] ) ] ) ] spids: [6486 6508] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:target_userdata_dir) op: assign_op.PlusEqual rhs: {(SQ </dietpi_userdata>)} spids: [6523] ) ] ) (C {<whiptail>} {<--title>} {(DQ <'Move user data'>)} {<--yesno>} { (DQ <'Your user data will be moved:'> <Id.Lit_Other '\\'> <'n - From: '> ($ Id.VSub_DollarName '$FP_USERDATA_CURRENT') <Id.Lit_Other '\\'> <'n - To: '> ($ Id.VSub_DollarName '$target_userdata_dir') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nDo you wish to continue?'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<--defaultno>} {<12>} {<70>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [6567] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$CHOICE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {</DietPi/dietpi/func/dietpi-set_userdata>} {(DQ ($ Id.VSub_DollarName '$FP_USERDATA_CURRENT'))} {(DQ ($ Id.VSub_DollarName '$target_userdata_dir'))} ) (C {<sleep>} {<1>}) ] spids: [6571 6585] ) ] ) ] spids: [6384 6401] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <Format>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_RECREATE_PARTITION_TABLE) op: assign_op.Equal rhs: {<1>} spids: [6631] ) ] ) (C {<local>} {<Id.Lit_VarLike 'drivepath_no_partitions='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<Return_Drive_Without_Partitions>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) } ) ] ) ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$partition_contains_userdata' ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Info: format prevented'>)} {<--msgbox>} { (DQ < 'Your DietPi user data is currently located on this drive:' > <Id.Lit_Other '\\'> <'n - '> ($ Id.VSub_DollarName '$FP_USERDATA_CURRENT') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nFormatting the drive at this time is not possible.'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> < 'nPlease move your user data elsewhere, before trying again:' > <Id.Lit_Other '\\'> <'nhttp://dietpi.com/phpbb/viewtopic.php?f=8&t=478'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<13>} {<80>} ) ] spids: [6656 6666] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-Ph>}) (C {<grep>} {<-ci>} {<-m1>} { (DQ <'^'> ($ Id.VSub_DollarName '$drivepath_no_partitions' ) ) } ) ] negated: F ) ] ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Notice:'>)} {<--msgbox>} { (DQ < 'As DietPi will format the entire drive with 1 partition, you must unmount ALL partitions on this disk, before formatting is available.' > ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<10>} {<70>} ) ] spids: [6713 6741] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<2>} spids: [6775] ) ] ) ] ) ] spids: [6610 6627] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <'Transfer RootFS'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_RECREATE_PARTITION_TABLE) op: assign_op.Equal rhs: {<0>} spids: [6809] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<df>} {<-Ph>}) (C {<grep>} {<-ci>} {<-m1>} { (DQ <'^'> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE > bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) ) } ) ] negated: F ) ] ) ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Notice:'>)} {<--msgbox>} { (DQ < 'Partition must be unmounted, before format and RootFS transfer can begin.' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nPlease unmount the partition, then try again.'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<10>} {<70>} ) ] spids: [6818 6850] ) ] else_action: [ (C {<whiptail>} {<--title>} {(DQ <'Move RootFS'>)} {<--yesno>} {<--defaultno>} { (DQ < 'This process will move RootFS data to another location. This may increase filesystem performance when using a USB drive over SD card, however, there are some limitations:' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> < 'n - The SD/EMMC card is still required for the boot process' > <Id.Lit_Other '\\'> <'n - ALL data on the target PARTITION will be deleted'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> < 'nNB: As this feature is still in testing, we recommend you use this feature on a fresh installation only.' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nDo you wish to continue?'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<18>} {<77>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [6929] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$CHOICE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<whiptail>} {<--title>} {(DQ <'Info:'>)} {<--msgbox>} { (DQ < 'On the next screen, you will be asked to format the target partition.' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> < 'nPlease see the following recommendations for RootFS target filesystem type:' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'n - Odroid'> <Id.Lit_Other '\\'> <'nRootFS transfer supports ONLY EXT4 format'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'n - RPi'> <Id.Lit_Other '\\'> <'nRootFS transfer supports EXT4, BTRFS and F2FS'> ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<16>} {<75>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<2>} spids: [6997] ) ] ) (command.WhileUntil keyword: <Id.KW_While while> cond: [ (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$TARGETMENUID')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 2>}) ) ) ] body: (command.DoGroup children:[(C {<Menu_Format>})]) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$FORMAT_COMPLETED' ) } ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<RootFS_Move>})] spids: [7027 7037] ) ] ) ] spids: [6933 6947] ) ] ) ] ) ] spids: [6788 6805] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <'Read Only'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<Toggle_WriteMode>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ROOTFS_RW_CHECKED) op: assign_op.Equal rhs: {<0>} spids: [7081] ) ] ) ] spids: [7057 7074] ) ] ) ] spids: [5990 6004] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<0>} spids: [7098] ) ] ) ] ) (C {<Init_Drives_and_Refresh>}) ] ) ) (command.ShFunction name: Menu_Format body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<2>} spids: [7126] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_COMPLETED) op: assign_op.Equal rhs: {<0>} spids: [7131] ) ] ) (C {</DietPi/dietpi/func/dietpi-set_dphys-swapfile>} {<0>} {</var/swap>}) (C {<local>} {<Id.Lit_VarLike 'partition_table_text='> (SQ <MBR>)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$FORMAT_GPT')}) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:partition_table_text) op: assign_op.Equal rhs: {(SQ <GPT>)} spids: [7170] ) ] ) ] spids: [7156 7166] ) ] ) (C {<local>} {<Id.Lit_VarLike 'format_type_text='> (SQ <EXT4>)}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:format_type_text) op: assign_op.Equal rhs: {(SQ <NTFS>)} spids: [7207] ) ] ) ] spids: [7189 7203] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 2>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:format_type_text) op: assign_op.Equal rhs: {(SQ <FAT32>)} spids: [7232] ) ] ) ] spids: [7214 7228] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 3>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:format_type_text) op: assign_op.Equal rhs: {(SQ <'HFS+'>)} spids: [7257] ) ] ) ] spids: [7239 7253] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 4>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:format_type_text) op: assign_op.Equal rhs: {(SQ <BTRFS>)} spids: [7282] ) ] ) ] spids: [7264 7278] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 5>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:format_type_text) op: assign_op.Equal rhs: {(SQ <F2FS>)} spids: [7307] ) ] ) ] spids: [7289 7303] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 6>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:format_type_text) op: assign_op.Equal rhs: {(SQ <EXFAT>)} spids: [7332] ) ] ) ] spids: [7314 7328] ) ] ) (C {<local>} {<Id.Lit_VarLike 'whiptail_menu_array='> (sh_array_literal left:<Id.Op_LParen _>)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <'Partition Type'>)} {(DQ <': '> ($ Id.VSub_DollarName '$partition_table_text'))} ] ) } spids: [7351] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <'Filesystem Type'>)} {(DQ <': '> ($ Id.VSub_DollarName '$format_type_text'))} ] ) } spids: [7364] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <Format>)} {(DQ <': Wipe all data and format drive with current options'>)} ] ) } spids: [7377] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(DQ <'Format Drive'>)} spids: [7390] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--menu>} {(DQ <'Please select formatting options:'>)} {<--cancel-button>} {(DQ <Back>)} {<--default-item>} {(DQ ($ Id.VSub_DollarName '$MENU_LASTITEM'))} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<11>} {<75>} {<3>} { (DQ (braced_var_sub token: <Id.VSub_Name whiptail_menu_array> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '3>&'> fd: 3 arg_word: {<1>} ) (redir.Redir op: <Id.Redir_GreatAnd '1>&'> fd: 1 arg_word: {<2>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<3>} ) ] ) ] ) ) } spids: [7396] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [7456] ) ] ) (C {<unset>} {<whiptail_menu_array>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$CHOICE')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:MENU_LASTITEM) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$OPTION'))} spids: [7485] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <'Partition Type'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(SQ <'Partition table?'>)} spids: [7513] ) ] ) (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--yesno>} { (DQ <'Would you like to use GPT or MBR parition table?'> <Id.Lit_Other '\\'> <'n - GPT is required for 2TB+ drives'> <Id.Lit_Other '\\'> <'n - MBR does NOT support 2TB+ drives'> <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nIf unsure, select GPT (default)'> ) } {<--yes-button>} {(DQ <MBR>)} {<--no-button>} {(DQ <GPT>)} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<--defaultno>} {<12>} {<70>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [7566] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_GPT) op: assign_op.Equal rhs: {<1>} spids: [7570] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$CHOICE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_GPT) op: assign_op.Equal rhs: {<0>} spids: [7592] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:partition_table_text) op: assign_op.Equal rhs: {(SQ <MBR>)} spids: [7596] ) ] ) ] spids: [7574 7588] ) ] ) ] spids: [7492 7509] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <'Filesystem Type'>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.Equal rhs: {(sh_array_literal left:<Id.Op_LParen _>)} spids: [7628] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [{(DQ <0>)} {(DQ <': EXT4 | Default (Recommended)'>)}] ) } spids: [7633] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <1>)} {(DQ <': NTFS | Windows (High CPU usage)'>)} ] ) } spids: [7645] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <2>)} {(DQ <': FAT32 | All OS (4GB filesize limit)'>)} ] ) } spids: [7657] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <3>)} { (DQ < ': HFS+ | Mac OS X (Intel Mac default file system)' > ) } ] ) } spids: [7669] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <4>)} {(DQ <': BTRFS | Linux (Modern filesystem)'>)} ] ) } spids: [7681] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <5>)} {(DQ <': F2FS | Linux (Flash filesystem)'>)} ] ) } spids: [7693] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ {(DQ <6>)} {(DQ <': exFAT | Windows (Flash filesystem)'>)} ] ) } spids: [7705] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(SQ <'Filesystem Type?'>)} spids: [7718] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--menu>} { (DQ < 'Please select a filesystem type for this format:' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nEXT4:'> <Id.Lit_Other '\\'> < 'nHighly recommended if you plan to use this drive solely on this system (dedicated drive).' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nNTFS:'> <Id.Lit_Other '\\'> < 'nRecommended if you plan to use this drive on a Windows system. High CPU usage during transfers.' > <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nFull list of different filesystem types:'> <Id.Lit_Other '\\'> <'nhttp://dietpi.com/phpbb/viewtopic.php?f=8&t=673&p=2898#p2898'> ) } {<--cancel-button>} {(DQ <Back>)} {<--default-item>} { (DQ ($ Id.VSub_DollarName '$FORMAT_FILESYSTEM_TYPE') ) } {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<24>} {<70>} {<5>} { (DQ (braced_var_sub token: <Id.VSub_Name whiptail_menu_array> bracket_op: (bracket_op.WholeArray op_id: Id.Lit_At ) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '3>&'> fd: 3 arg_word: {<1>} ) (redir.Redir op: <Id.Redir_GreatAnd '1>&'> fd: 1 arg_word: {<2>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<3>} ) ] ) ] ) ) } spids: [7724] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [7802] ) ] ) (C {<unset>} {<whiptail_menu_array>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$CHOICE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DAmp left: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$OPTION')} ) right: (arith_expr.ArithWord w: {<Id.Lit_Digits 3>} ) ) right: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<dpkg>} {<--get-selections>} ) (C {<grep>} {<-ci>} {<-m1>} {(SQ <'^hfsutils'>)} ) ] negated: F ) ] ) ) } ) ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ < 'Installing additional packages for HFS+ support, please wait...' > ) } ) (C {<G_AGI>} {<hfsplus>} {<hfsprogs>} {<hfsutils>}) ] spids: [7835 7872] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DAmp left: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$OPTION')} ) right: (arith_expr.ArithWord w: {<Id.Lit_Digits 4>} ) ) right: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<dpkg>} {<--get-selections>} ) (C {<grep>} {<-ci>} {<-m1>} {(SQ <'^btrfs-tools'>)} ) ] negated: F ) ] ) ) } ) ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ < 'Installing additional packages for BTRFS support, please wait...' > ) } ) (C {<G_AGI>} {<btrfs-tools>}) ] spids: [7899 7936] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DAmp left: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$OPTION')} ) right: (arith_expr.ArithWord w: {<Id.Lit_Digits 5>} ) ) right: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<dpkg>} {<--get-selections>} ) (C {<grep>} {<-ci>} {<-m1>} {(SQ <'^f2fs-tools'>)} ) ] negated: F ) ] ) ) } ) ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ < 'Installing additional packages for F2FS support, please wait...' > ) } ) (C {<G_AGI>} {<f2fs-tools>}) ] spids: [7959 7996] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DAmp left: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$OPTION')} ) right: (arith_expr.ArithWord w: {<Id.Lit_Digits 6>} ) ) right: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<dpkg>} {<--get-selections>} ) (C {<grep>} {<-ci>} {<-m1>} {(SQ <'^exfat-utils'>)} ) ] negated: F ) ] ) ) } ) ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ < 'Installing additional packages for exFAT support, please wait...' > ) } ) (C {<G_AGI>} {<exfat-utils>} {<exfat-fuse>}) ] spids: [8019 8056] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FORMAT_FILESYSTEM_TYPE) op: assign_op.Equal rhs: {($ Id.VSub_DollarName '$OPTION')} spids: [8081] ) ] ) ] spids: [7813 7827] ) ] ) ] spids: [7607 7624] ) (if_arm cond: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$OPTION'))} {<Id.Lit_Equals '='>} {(DQ <Format>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<local>} {<Id.Lit_VarLike 'drivepath_no_partitions='> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (C {<Return_Drive_Without_Partitions>} { (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) } ) ] ) ) } ) (C {<local>} {<Id.Lit_VarLike 'text_desc='> (DQ <'Format Drive:'> <Id.Lit_Other '\\'> <'n - '> ($ Id.VSub_DollarName '$drivepath_no_partitions') <Id.Lit_Other '\\'> <'n - UUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED')} ) ) ) <Id.Lit_Other '\\'> <'n - Partition table: '> ($ Id.VSub_DollarName '$partition_table_text') <Id.Lit_Other '\\'> <'n - Filesystem type: '> ($ Id.VSub_DollarName '$format_type_text') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nALL DATA and PARTITIONS on this drive will be DELETED.'> <Id.Lit_Other '\\'> <'nDo you wish to continue?'> ) } ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$FORMAT_RECREATE_PARTITION_TABLE' ) } ) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:text_desc) op: assign_op.Equal rhs: { (DQ <'Format partition:'> <Id.Lit_Other '\\'> <'n - '> (braced_var_sub token: <Id.VSub_Name aDRIVE_MOUNT_SOURCE> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) <Id.Lit_Other '\\'> <'n - UUID='> (braced_var_sub token: <Id.VSub_Name aDRIVE_UUID> bracket_op: (bracket_op.ArrayIndex expr: (arith_expr.ArithWord w: { ($ Id.VSub_DollarName '$INDEX_DRIVE_BEING_EDITED' ) } ) ) ) <Id.Lit_Other '\\'> <'n - Partition table: '> ($ Id.VSub_DollarName '$partition_table_text') <Id.Lit_Other '\\'> <'n - Filesystem type: '> ($ Id.VSub_DollarName '$format_type_text') <Id.Lit_Other '\\'> <n> <Id.Lit_Other '\\'> <'nALL DATA on this partition will be DELETED.'> <Id.Lit_Other '\\'> <'nDo you wish to continue?'> ) } spids: [8174] ) ] ) ] spids: [8158 8170] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(SQ <'Start Format?'>)} spids: [8213] ) ] ) (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--yesno>} {(DQ ($ Id.VSub_DollarName '$text_desc'))} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<--defaultno>} {<14>} {<75>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [8246] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$CHOICE')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<Run_Format>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<0>} spids: [8272] ) ] ) ] spids: [8250 8264] ) ] ) ] spids: [8090 8107] ) ] ) ] spids: [7467 7481] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<1>} spids: [8289] ) ] ) ] ) ] ) ) (command.ShFunction name: Menu_Select_Mount_Location body: (command.BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'whiptail_menu_array='> (sh_array_literal left:<Id.Op_LParen _>)} ) (command.Pipeline children: [ (C {<df>} {<-Ph>}) (C {<tail>} {<-n>} {<Id.Lit_Other '+'> <2>}) (C {<grep>} {<-v>} {(SQ <'tmpfs[[:space:]]'>)}) (command.Simple words: [{<grep>} {<-v>} {(SQ <'^udev'>)}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {</tmp/dietpi-drive_manager_selmnt>} ) ] ) ] negated: F ) (command.WhileUntil keyword: <Id.KW_While while> cond: [(C {<read>} {<line>})] body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:whiptail_menu_array) op: assign_op.PlusEqual rhs: { (sh_array_literal left: <Id.Op_LParen _> words: [ { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<echo>} {<-e>} {($ Id.VSub_DollarName '$line')}) (C {<awk>} {(SQ <'{print $6}'>)}) ] negated: F ) ] ) ) ) } { (DQ <': '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<echo>} {<-e>} {($ Id.VSub_DollarName '$line')}) (C {<awk>} {(SQ <'{print $1}'>)}) ] negated: F ) ] ) ) <' | size: '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<echo>} {<-e>} {($ Id.VSub_DollarName '$line')}) (C {<awk>} {(SQ <'{print $2}'>)}) ] negated: F ) ] ) ) <' | available: '> (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {<echo>} {<-e>} {($ Id.VSub_DollarName '$line')}) (C {<awk>} {(SQ <'{print $4}'>)}) ] negated: F ) ] ) ) ) } ] ) } spids: [8371] ) ] ) ] ) redirects: [ (redir.Redir op: <Id.Redir_Less '<'> fd: -1 arg_word: {</tmp/dietpi-drive_manager_selmnt>} ) ] ) (C {<rm>} {</tmp/dietpi-drive_manager_selmnt>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} spids: [8459] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:OPTION) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> command_list: (command.CommandList children: [ (command.Simple words: [ {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--menu>} {(DQ <'Please select a mount location to use:'>)} {<--default-item>} {(DQ ($ Id.VSub_DollarName '$MENU_LASTITEM'))} {<--cancel-button>} {(DQ <Exit>)} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<16>} {<110>} {<7>} { (DQ (braced_var_sub token: <Id.VSub_Name whiptail_menu_array> bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) ) } ] redirects: [ (redir.Redir op: <Id.Redir_GreatAnd '3>&'> fd: 3 arg_word: {<1>} ) (redir.Redir op: <Id.Redir_GreatAnd '1>&'> fd: 1 arg_word: {<2>} ) (redir.Redir op: <Id.Redir_GreatAnd '2>&'> fd: 2 arg_word: {<3>} ) ] ) ] ) ) } spids: [8465] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [8526] ) ] ) (C {<unset>} {<whiptail_menu_array>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$CHOICE')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<local>} {<Id.Lit_VarLike 'drive_manager_selection='> (DQ ($ Id.VSub_DollarName '$OPTION')) } ) (C {<G_DIETPI-NOTIFY>} {<0>} { (DQ <'Drive mount selected: '> ($ Id.VSub_DollarName '$drive_manager_selection') ) } ) (command.Simple words: [{<echo>} {<-e>} {(DQ ($ Id.VSub_DollarName '$drive_manager_selection'))}] redirects: [ (redir.Redir op: <Id.Redir_Great '>'> fd: -1 arg_word: {(DQ ($ Id.VSub_DollarName '$FP_DRIVE_MANAGER_SELECTION'))} ) ] ) ] spids: [8537 8551] ) ] ) ] ) ) (command.ShFunction name: Menu_Exit body: (command.BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_TITLE) op: assign_op.Equal rhs: {(DQ <'Exit '> ($ Id.VSub_DollarName '$PROGRAM_NAME') <'?'>)} spids: [8605] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:WHIP_QUESTION) op: assign_op.Equal rhs: {(DQ <'Exit '> ($ Id.VSub_DollarName '$PROGRAM_NAME') <'?'>)} spids: [8613] ) ] ) (C {<whiptail>} {<--title>} {(DQ ($ Id.VSub_DollarName '$WHIP_TITLE'))} {<--yesno>} {(DQ ($ Id.VSub_DollarName '$WHIP_QUESTION'))} {<--backtitle>} {(DQ ($ Id.VSub_DollarName '$PROGRAM_NAME'))} {<--yes-button>} {(DQ <Ok>)} {<--no-button>} {(DQ <Back>)} {<--defaultno>} {<9>} {<55>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:CHOICE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '$?')} spids: [8660] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$CHOICE')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<-1>} spids: [8686] ) ] ) ] spids: [8664 8678] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:TARGETMENUID) op: assign_op.Equal rhs: {<0>} spids: [8699] ) ] ) ] ) ] ) ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_GreatEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$INPUT')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:SERVICE_CONTROL) op: assign_op.Equal rhs: {<0>} spids: [8742] ) ] ) ] spids: [8724 8738] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$SERVICE_CONTROL')}) ) terminator: <Id.Op_Semi _> ) ] action: [(C {</DietPi/dietpi/dietpi-services>} {<stop>})] spids: [8758 8768] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$INPUT')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 4>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (command.Simple words: [{<cat>}] redirects: [ (redir.HereDoc op: <Id.Redir_DLess '<<'> fd: -1 here_begin: {<_EOF_>} here_end_span_id: 8834 stdin_parts: [ <'#Samba Client------------------------------------------------------\n'> < '#/mnt/samba . Please use dietpi-config and the Networking Options: NAS menu to setup this mount\n' > <'\n'> <'#FTP Client Mount--------------------------------------------------\n'> < '#/mnt/ftp_client . Please use dietpi-config and the Networking Options: NAS menu to setup this mount\n' > <'\n'> <'#NFS Client Mount--------------------------------------------------\n'> < '#/mnt/nfs_client . Please use dietpi-config and the Networking Options: NAS menu to setup this mount\n' > <'\n'> <'#TMPFS / MISC ------------------------------------------------------\n'> <'proc /proc proc defaults\t\t\t\t\t\t\t\t\t\t\t0 0\n'> < 'tmpfs \t\t\t/tmp \t\t\ttmpfs \tdefaults,noatime,nodev,nosuid,mode=1777\t\t\t\t0 0\n' > < 'tmpfs \t\t\t/var/log \t\ttmpfs \tdefaults,size=20m,noatime,nodev,nosuid,mode=1777\t0 0\n' > < 'tmpfs \t\t\t/DietPi \t\ttmpfs \tdefaults,size=10m,noatime,nodev,nosuid,mode=1777\t0 0\n' > <'\n'> <'#Internal Drives---------------------------------------------------\n'> ] ) (redir.Redir op:<Id.Redir_Great '>'> fd:-1 arg_word:{</etc/fstab>}) ] ) (C {<Init_Drives_and_Refresh>}) ] spids: [8789 8803] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$INPUT')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 3>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<RootFS_RW_Check>})] spids: [8845 8859] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$INPUT')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 2>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Init_Drives_and_Refresh>}) (C {<RootFS_Low_Free_Space_Check>})] spids: [8871 8885] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$INPUT')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Init_Drives_and_Refresh>}) (C {<Menu_Select_Mount_Location>})] spids: [8900 8914] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$G_HW_MODEL')}) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 20>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [ (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ ($ Id.VSub_DollarName '$PROGRAM_NAME') <' is not currently supported on VM images'> ) } ) ] spids: [8929 8943] ) ] else_action: [ (C {<Init_Drives_and_Refresh>}) (command.WhileUntil keyword: <Id.KW_While while> cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$TARGETMENUID')}) right: (arith_expr.Unary op_id: Id.Node_UnaryMinus child: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) ) terminator: <Id.Op_Semi _> ) ] body: (command.DoGroup children: [ (C {<clear>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$TARGETMENUID')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 0>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Menu_Main_Drive_Manager>})] spids: [8993 9007] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$TARGETMENUID')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 1>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Menu_Drive_Manager_Edit_Drive>})] spids: [9015 9029] ) (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: (arith_expr.ArithWord w: {($ Id.VSub_DollarName '$TARGETMENUID')} ) right: (arith_expr.ArithWord w:{<Id.Lit_Digits 2>}) ) ) terminator: <Id.Op_Semi _> ) ] action: [(C {<Menu_Format>})] spids: [9037 9051] ) ] ) ] ) ) ] ) (C {<Destroy>}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.DParen child: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$SERVICE_CONTROL')}) ) terminator: <Id.Op_Semi _> ) ] action: [(C {</DietPi/dietpi/dietpi-services>} {<start>})] spids: [9090 9100] ) ] ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName '$EXIT_CODE')} ) ] )