(BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:FP_SCRIPT) op: assign_op.Equal rhs: {(SQ <'/DietPi/dietpi/func/dietpi-set_software'>)} spids: [50] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:AVAIABLE_COMMANDS) op: assign_op.Equal rhs: { (DQ <'\n'> <'Available commands\n'> ($ Id.VSub_DollarName '$FP_SCRIPT') <'\t\t\tlocale\t\t\t\t\ten_GB.UTF-8\n'> ($ Id.VSub_DollarName '$FP_SCRIPT') <'\t\t\tallo\t\t\t\t\teth_dhcp / eth_static\n'> ($ Id.VSub_DollarName '$FP_SCRIPT') < '\t\t\tuseradd\t\t\t\t\tX=create user with name X and default permissions, using global DietPi password (dietpi)\n' > ($ Id.VSub_DollarName '$FP_SCRIPT') <'\t\t\tuserdel\t\t\t\t\tX=delete user with name X\n'> ($ Id.VSub_DollarName '$FP_SCRIPT') <'\t\t\tapt-mirror\t\t\t\turl/default\n'> ($ Id.VSub_DollarName '$FP_SCRIPT') <'\t\t\tntpd-mode\t\t\t\tconfigures NTPD mode (eg: ntp/systemd)\n'> ($ Id.VSub_DollarName '$FP_SCRIPT') < '\t\t\tverify_dietpi.txt\t\tverifies dietpi.txt entries, adds missing entries if required\n' > ) } spids: [56] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INPUT_MODE_NAME) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$1'))} spids: [86] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INPUT_MODE_VALUE) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$2'))} spids: [92] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INPUT_ADDITIONAL_1) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$3'))} spids: [99] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INPUT_ADDITIONAL_2) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$4'))} spids: [105] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INPUT_ADDITIONAL_3) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$5'))} spids: [111] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INPUT_ADDITIONAL_4) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number '$6'))} spids: [117] ) ] ) (C {<.>} {<'/DietPi/dietpi/func/dietpi-globals'>}) (C {<G_CHECK_ROOT_USER>}) (C {<G_CHECK_ROOTFS_RW>}) (C {<export>} {<Id.Lit_VarLike 'G_PROGRAM_NAME='> (SQ <DietPi-Set_software>)}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EXIT_CODE) op: assign_op.Equal rhs: {<0>} spids: [152] ) ] ) (command.ShFunction name: Unknown_Input_Name body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EXIT_CODE) op: assign_op.Equal rhs: {<1>} spids: [164] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Unknown input name ('> ($ Id.VSub_DollarName '$INPUT_MODE_NAME') <'). Nothing has been applied.'> ) } ) (C {<echo>} {<-e>} {(DQ ($ Id.VSub_DollarName '$AVAIABLE_COMMANDS'))}) ] ) ) (command.ShFunction name: Unknown_Input_Mode body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EXIT_CODE) op: assign_op.Equal rhs: {<1>} spids: [200] ) ] ) (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Unknown input value ('> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <'). Nothing has been applied.'> ) } ) ] ) ) (command.ShFunction name: Locale_Main body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<_EOF_>} here_end_span_id: 274 stdin_parts: [ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <' UTF-8\n'> <'en_GB.UTF-8 UTF-8\n'> ] ) ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/etc/locale.gen'>} ) ] do_fork: T ) (C {<G_RUN_CMD>} {<dpkg-reconfigure>} {<-f>} {<noninteractive>} {<locales>}) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<_EOF_>} here_end_span_id: 343 stdin_parts: [ < '# To force server locales on SSH access, as dropbear does automatically overwrite them by client values:\n' > <'export LANG='> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <'\n'> <'export LC_ALL='> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <'\n'> <'export LANGUAGE='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$INPUT_MODE_VALUE')}) (C {<sed>} {(SQ <'s/\\..*//'>)}) ] negated: F ) ) <':'> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {($ Id.VSub_DollarName '$INPUT_MODE_VALUE')}) (C {<sed>} {(SQ <'s/_.*//'>)}) ] negated: F ) ) <'\n'> ] ) ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/etc/profile.d/99-dietpi-force-locale.sh'>} ) ] do_fork: T ) (C {<chmod>} {<Id.Lit_Other '+'> <x>} {<'/etc/profile.d/99-dietpi-force-locale.sh'>}) (C {<sed>} {<-i>} { (DQ <'/AUTO_SETUP_LOCALE=/c'> <Id.Lit_BadBackslash '\\'> <'AUTO_SETUP_LOCALE='> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') ) } {<'/DietPi/dietpi.txt'>} ) ] spids: [243 256] ) ] else_action: [(C {<Unknown_Input_Mode>})] ) ] ) ) (command.ShFunction name: AptMirror_Main body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE'))} {<Id.Lit_Equals '='>} {(DQ <default>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: {($ Id.VSub_DollarName '$G_HW_MODEL')} right: {<Id.Lit_Digits 10>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INPUT_MODE_VALUE) op: assign_op.Equal rhs: { (SQ < 'https://www.mirrorservice.org/sites/archive.raspbian.org/raspbian' > ) } spids: [464] ) ] ) ] spids: [446 460] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INPUT_MODE_VALUE) op: assign_op.Equal rhs: {(SQ <'https://deb.debian.org/debian/'>)} spids: [475] ) ] ) ] ) ] spids: [425 442] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: {($ Id.VSub_DollarName '$G_HW_MODEL')} right: {<Id.Lit_Digits 10>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<_EOF_>} here_end_span_id: 528 stdin_parts: [ <'deb '> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <' '> ($ Id.VSub_DollarName '$G_DISTRO_NAME') <' main contrib non-free rpi\n'> ] ) ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/etc/apt/sources.list'>} ) ] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<_EOF_>} here_end_span_id: 545 stdin_parts: [ <'deb https://archive.raspberrypi.org/debian/ '> ($ Id.VSub_DollarName '$G_DISTRO_NAME') <' main ui\n'> ] ) ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/etc/apt/sources.list.d/raspi.list'>} ) ] do_fork: T ) (C {<sed>} {<-i>} { (DQ <'/CONFIG_APT_RASPBIAN_MIRROR=/c'> <Id.Lit_BadBackslash '\\'> <'CONFIG_APT_RASPBIAN_MIRROR='> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') ) } {<'/DietPi/dietpi.txt'>} ) ] spids: [494 508] ) ] else_action: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<_EOF_>} here_end_span_id: 604 stdin_parts: [ <'deb '> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <' '> ($ Id.VSub_DollarName '$G_DISTRO_NAME') <' main contrib non-free\n'> <'deb '> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <' '> ($ Id.VSub_DollarName '$G_DISTRO_NAME') <'-updates main contrib non-free\n'> <'deb https://deb.debian.org/debian-security/ '> ($ Id.VSub_DollarName '$G_DISTRO_NAME') <'/updates main contrib non-free\n'> <'deb '> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <' '> ($ Id.VSub_DollarName '$G_DISTRO_NAME') <'-backports main contrib non-free\n'> ] ) ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/etc/apt/sources.list'>} ) ] do_fork: T ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Less left: {($ Id.VSub_DollarName '$G_DISTRO')} right: {<Id.Lit_Digits 4>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sed>} {<-i>} {(SQ <'s|https://deb.debian.org|http://deb.debian.org|g'>)} {<'/etc/apt/sources.list'>} ) ] spids: [611 625] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_Great left: {($ Id.VSub_DollarName '$G_DISTRO')} right: {<Id.Lit_Digits 4>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sed>} {<-i>} {(SQ <'/backports/d'>)} {<'/etc/apt/sources.list'>}) ] spids: [645 659] ) ] ) (C {<sed>} {<-i>} { (DQ <'/CONFIG_APT_DEBIAN_MIRROR=/c'> <Id.Lit_BadBackslash '\\'> <'CONFIG_APT_DEBIAN_MIRROR='> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') ) } {<'/DietPi/dietpi.txt'>} ) ] ) ] spids: [404 417] ) ] else_action: [(C {<Unknown_Input_Mode>})] ) ] ) ) (command.ShFunction name: NtpdMode_Main body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sed>} {<-i>} {(DQ <'/CONFIG_NTP_MODE=/c'> <Id.Lit_BadBackslash '\\'> <'CONFIG_NTP_MODE=0'>)} {<'/DietPi/dietpi.txt'>} ) (command.Simple words: [{<killall>} {<-w>} {<'/DietPi/dietpi/func/run_ntpd'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<killall>} {<-w>} {<ntpd>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (command.Simple words: [{<rm>} {<'/var/lib/dietpi/.ntpd_exit_status'>}] redirects: [ (redir op: <Id.Redir_AndGreat '&>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) ] do_fork: T ) (C {<local>} {<Id.Lit_VarLike 'ntpd_mirror='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<grep>} {<-m1>} {(SQ <'^CONFIG_NTP_MIRROR='>)} {<'/DietPi/dietpi.txt'>} ) (C {<sed>} {(SQ <'s/.*=//'>)}) ] negated: F ) ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$ntpd_mirror'))} {<Id.Lit_Equals '='>} {(DQ <default>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:ntpd_mirror) op: assign_op.Equal rhs: {(SQ <debian.pool.ntp.org>)} spids: [865] ) ] ) ] spids: [844 861] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DAmp left: (arith_expr.Binary op_id: Id.Arith_GreatEqual left: {($ Id.VSub_DollarName '$INPUT_MODE_VALUE')} right: {<Id.Lit_Digits 1>} ) right: (arith_expr.Binary op_id: Id.Arith_LessEqual left: {($ Id.VSub_DollarName '$INPUT_MODE_VALUE')} right: {<Id.Lit_Digits 3>} ) ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_GreatEqual left: { ($ Id.VSub_DollarName '$G_DIETPI_INSTALL_STAGE') } right: {<Id.Lit_Digits 0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<'/DietPi/dietpi/dietpi-software'>} {<install>} {<170>})] spids: [910 924] ) ] ) (C {<sed>} {<-i>} {(SQ <'/^[[:blank:]#;]*server [0-9]/d'>)} {<'/etc/ntp.conf'>} ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 4>} ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike i> ) body: (command.DoGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<grep>} { (DQ <'^[[:blank:]]*pool '> ($ Id.VSub_DollarName '$i') ) } {<'/etc/ntp.conf'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sed>} {<-i>} { (DQ <'s/^[[:blank:]]*pool '> ($ Id.VSub_DollarName '$i') <'.*/pool '> ($ Id.VSub_DollarName '$i') <.> ($ Id.VSub_DollarName '$ntpd_mirror') <' iburst/'> ) } {<'/etc/ntp.conf'>} ) ] spids: [981 993] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<grep>} { (DQ <'^[[:blank:]#;]*pool '> ($ Id.VSub_DollarName '$i') ) } {<'/etc/ntp.conf'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sed>} {<-i>} { (DQ <'s/^[[:blank:]#;]*pool '> ($ Id.VSub_DollarName '$i') <'.*/pool '> ($ Id.VSub_DollarName '$i') <.> ($ Id.VSub_DollarName '$ntpd_mirror') <' iburst/'> ) } {<'/etc/ntp.conf'>} ) ] spids: [1015 1027] ) ] else_action: [ (command.Simple words: [ {<echo>} {<-e>} { (DQ <'pool '> ($ Id.VSub_DollarName '$i') <.> ($ Id.VSub_DollarName '$ntpd_mirror') <' iburst'> ) } ] redirects: [ (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {<'/etc/ntp.conf'>} ) ] do_fork: T ) ] ) ] ) ) ] spids: [880 902] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_GreatEqual left: {($ Id.VSub_DollarName '$G_DIETPI_INSTALL_STAGE')} right: {<Id.Lit_Digits 0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<'/DietPi/dietpi/dietpi-software'>} {<uninstall>} {<170>})] spids: [1091 1105] ) ] else_action: [(C {<G_AGP>} {<ntp>})] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_DollarName '$INPUT_MODE_VALUE')} right: {<Id.Lit_Digits 4>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<_EOF_>} here_end_span_id: 1182 stdin_parts: [ <'[Time]\n'> <'Servers=0.'> ($ Id.VSub_DollarName '$ntpd_mirror') <' 1.'> ($ Id.VSub_DollarName '$ntpd_mirror') <' 2.'> ($ Id.VSub_DollarName '$ntpd_mirror') <' 3.'> ($ Id.VSub_DollarName '$ntpd_mirror') <'\n'> ] ) ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/etc/systemd/timesyncd.conf'>} ) ] do_fork: T ) (C {<systemctl>} {<daemon-reload>}) (C {<timedatectl>} {<set-ntp>} {<true>}) ] spids: [1139 1153] ) ] else_action: [ (C {<systemctl>} {<stop>} {<systemd-timesyncd>}) (C {<systemctl>} {<disable>} {<systemd-timesyncd>}) ] ) (C {<sed>} {<-i>} { (DQ <'/CONFIG_NTP_MODE=/c'> <Id.Lit_BadBackslash '\\'> <'CONFIG_NTP_MODE='> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') ) } {<'/DietPi/dietpi.txt'>} ) (C {<'/DietPi/dietpi/func/run_ntpd'>} {<status>}) ] spids: [745 758] ) ] else_action: [(C {<Unknown_Input_Mode>})] ) ] ) ) (command.ShFunction name: Allo_Main body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE'))} {<Id.Lit_Equals '='>} {(DQ <eth_dhcp>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sed>} {<-i>} { (DQ <'/iface eth/c'> <Id.Lit_BadBackslash '\\'> <'iface eth0 inet dhcp'> ) } {<'/etc/network/interfaces'>} ) (C {<sed>} {<-i>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<cat>} {<-n>} {<'/etc/network/interfaces'>}) (C {<grep>} {(SQ <'dns-nameservers '>)}) (C {<sed>} {<-n>} {<1p>}) (C {<awk>} {(SQ <'{print $1}'>)}) ] negated: F ) ) <'s/.*/#dns-nameservers 8.8.8.8/'> ) } {<'/etc/network/interfaces'>} ) ] spids: [1310 1327] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE'))} {<Id.Lit_Equals '='>} {(DQ <eth_static>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<sed>} {<-i>} { (DQ <'/iface eth/c'> <Id.Lit_BadBackslash '\\'> <'iface eth0 inet static'> ) } {<'/etc/network/interfaces'>} ) (C {<sed>} {<-i>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<cat>} {<-n>} {<'/etc/network/interfaces'>}) (C {<grep>} {(SQ <'address '>)}) (C {<sed>} {<-n>} {<1p>}) (C {<awk>} {(SQ <'{print $1}'>)}) ] negated: F ) ) <'s/.*/address '> ($ Id.VSub_DollarName '$INPUT_ADDITIONAL_1') <'/'> ) } {<'/etc/network/interfaces'>} ) (C {<sed>} {<-i>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<cat>} {<-n>} {<'/etc/network/interfaces'>}) (C {<grep>} {(SQ <'gateway '>)}) (C {<sed>} {<-n>} {<1p>}) (C {<awk>} {(SQ <'{print $1}'>)}) ] negated: F ) ) <'s/.*/gateway '> ($ Id.VSub_DollarName '$INPUT_ADDITIONAL_2') <'/'> ) } {<'/etc/network/interfaces'>} ) (C {<sed>} {<-i>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<cat>} {<-n>} {<'/etc/network/interfaces'>}) (C {<grep>} {(SQ <'netmask '>)}) (C {<sed>} {<-n>} {<1p>}) (C {<awk>} {(SQ <'{print $1}'>)}) ] negated: F ) ) <'s/.*/netmask '> ($ Id.VSub_DollarName '$INPUT_ADDITIONAL_3') <'/'> ) } {<'/etc/network/interfaces'>} ) (C {<sed>} {<-i>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<cat>} {<-n>} {<'/etc/network/interfaces'>}) (C {<grep>} {(SQ <'dns-nameservers '>)}) (C {<sed>} {<-n>} {<1p>}) (C {<awk>} {(SQ <'{print $1}'>)}) ] negated: F ) ) <'s/.*/dns-nameservers '> ($ Id.VSub_DollarName '$INPUT_ADDITIONAL_4') <'/'> ) } {<'/etc/network/interfaces'>} ) ] spids: [1387 1404] ) ] ) ] spids: [1293 1306] ) ] else_action: [(C {<Unknown_Input_Mode>})] ) ] ) ) (command.ShFunction name: Useradd_Main body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<mkdir>} {<-p>} {<'/home'>}) (C {<useradd>} {<-m>} {<-s>} {<'/bin/bash'>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE'))} ) (command.Simple words: [{<chpasswd>}] redirects: [ (redir op: <Id.Redir_TLess '<<<'> loc: (redir_loc.Fd fd:0) arg: { (DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <':'> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<cat>} {<'/DietPi/dietpi.txt'>}) (C {<grep>} {<-m1>} {(SQ <'^AUTO_SETUP_GLOBAL_PASSWORD='>)}) (C {<sed>} {(SQ <'s/.*=//'>)}) ] negated: F ) ) ) } ) ] do_fork: T ) (C {<cp>} {<'/root/.profile'>} {<'/home/'> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <'/'>} ) (C {<cp>} {<'/root/.bashrc'>} {<'/home/'> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <'/'>} ) (C {<sed>} {<-i>} {(SQ <'/^\\/DietPi\\/dietpi\\/login/c\\sudo \\/DietPi\\/dietpi\\/login'>)} {<'/home/'> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <'/.bashrc'>} ) (C {<chown>} {<-R>} {($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <Id.Lit_Colon ':'> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') } {<'/home/'> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE')} ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<cat>} {<'/etc/sudoers'>}) (C {<grep>} {<-ci>} {<-m1>} { (DQ <'^'> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <'[[:space:]]'> ) } ) ] negated: F ) ) } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<_EOF_>} here_end_span_id: 1818 stdin_parts: [ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <' ALL=NOPASSWD: ALL\n'> ] ) ) (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {<'/etc/sudoers'>} ) ] do_fork: T ) ] spids: [1771 1801] ) ] ) (C {<local>} {<Id.Lit_VarLike 'group_array='> (sh_array_literal left:<Id.Op_LParen _>)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <input>)}])} spids: [1836] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <netdev>)}])} spids: [1844] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <spi>)}])} spids: [1852] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <i2c>)}])} spids: [1860] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <gpio>)}])} spids: [1868] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <tty>)}])} spids: [1876] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <users>)}])} spids: [1884] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <games>)}])} spids: [1892] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <plugdev>)}])} spids: [1900] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <video>)}])} spids: [1908] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <audio>)}])} spids: [1916] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <sudo>)}])} spids: [1924] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <cdrom>)}])} spids: [1932] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <dialout>)}])} spids: [1940] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <adm>)}])} spids: [1948] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:group_array) op: assign_op.PlusEqual rhs: {(sh_array_literal left:<Id.Op_LParen _> words:[{(SQ <www-data>)}])} spids: [1961] ) ] ) (command.ForExpr init: (arith_expr.BinaryAssign op_id: Id.Arith_Equal left: <Id.Lit_ArithVarLike i> right: {<Id.Lit_Digits 0>} ) cond: (arith_expr.Binary op_id: Id.Arith_Less left: <Id.Lit_ArithVarLike i> right: { (braced_var_sub token: <Id.VSub_Name group_array> prefix_op: (Id.VSub_Pound) bracket_op: (bracket_op.WholeArray op_id:Id.Lit_At) ) } ) update: (arith_expr.UnaryAssign op_id: Id.Node_PostDPlus child: <Id.Lit_ArithVarLike i> ) body: (command.DoGroup children: [ (C {<usermod>} {<-a>} {<-G>} { (braced_var_sub token: <Id.VSub_Name group_array> bracket_op: (bracket_op.ArrayIndex expr: {($ Id.VSub_DollarName '$i')} ) ) } {($ Id.VSub_DollarName '$INPUT_MODE_VALUE')} ) ] ) ) (C {<unset>} {<group_array>}) ] spids: [1637 1650] ) ] else_action: [(C {<Unknown_Input_Mode>})] ) ] ) ) (command.ShFunction name: Userdel_Main body: (BraceGroup children: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_VALUE'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<userdel>} {<-f>} {($ Id.VSub_DollarName '$INPUT_MODE_VALUE')}) (C {<rm>} {<-R>} {<'/home/'> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE')}) (C {<sed>} {<-i>} {(DQ <'/^'> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <'[[:space:]]/d'>)} {<'/etc/sudoers'>} ) ] spids: [2049 2062] ) ] else_action: [(C {<Unknown_Input_Mode>})] ) ] ) ) (command.ShFunction name: Verify_DietPi_Txt body: (BraceGroup children: [ (C {<local>} {<Id.Lit_VarLike 'gitbranch='> (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<grep>} {<-m1>} {(SQ <'^DEV_GITBRANCH='>)} {<'/DietPi/dietpi.txt'>}) (C {<sed>} {(SQ <'s/.*=//'>)}) ] negated: F ) ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName '$gitbranch'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:gitbranch) op: assign_op.Equal rhs: {(SQ <master>)} spids: [2172] ) ] ) ] spids: [2155 2168] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:INSTALL_URL) op: assign_op.Equal rhs: { (DQ <'https://raw.githubusercontent.com/Fourdee/DietPi/'> ($ Id.VSub_DollarName '$gitbranch') <'/dietpi.txt'> ) } spids: [2183] ) ] ) (C {<G_CHECK_URL>} {(DQ ($ Id.VSub_DollarName '$INSTALL_URL'))}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Binary op_id: Id.Arith_DEqual left: {($ Id.VSub_QMark '$?')} right: {<Id.Lit_Digits 0>} ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<G_DIETPI-NOTIFY>} {<0>} {(DQ <'Patching dietpi.txt'>)}) (C {<wget>} {(DQ ($ Id.VSub_DollarName '$INSTALL_URL'))} {<-O>} {<'/tmp/dietpi.txt_patch'>} ) (C {<local>} {<Id.Lit_VarLike 'entry='> <0>}) (C {<local>} {<Id.Lit_VarLike 'value='> <0>}) (command.WhileUntil keyword: <Id.KW_While while> cond: (condition.Shell commands:[(C {<read>} {<line>})]) body: (command.DoGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:entry) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {<-e>} {(DQ ($ Id.VSub_DollarName '$line'))}) (C {<grep>} {(DQ <'^[^#;/]'>)}) ] negated: F ) ) } spids: [2260] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-n>} {(DQ ($ Id.VSub_DollarName '$entry'))} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:value) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<echo>} {<-e>} { (DQ (braced_var_sub token: <Id.VSub_Name entry> suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPound arg_word: {<'*='>} ) ) ) } ) ) } spids: [2299] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:entry) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<echo>} {<-e>} { (DQ (braced_var_sub token: <Id.VSub_Name entry> suffix_op: (suffix_op.Unary op_id: Id.VOp1_DPercent arg_word: {<'=*'>} ) ) ) } ) ) } spids: [2318] ) ] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (command.DParen child: (arith_expr.Unary op_id: Id.Arith_Bang child: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<grep>} {<-ci>} {<-m1>} { (DQ <'^'> ($ Id.VSub_DollarName '$entry' ) <'='> ) } {<'/DietPi/dietpi.txt'>} ) ) } ) ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<G_DIETPI-NOTIFY>} {<2>} { (DQ <'Updating dietpi.txt with new entry: '> ($ Id.VSub_DollarName '$entry') <'='> ($ Id.VSub_DollarName '$value') ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<_EOF_>} here_end_span_id: 2399 stdin_parts: [ ($ Id.VSub_DollarName '$entry') <'='> ($ Id.VSub_DollarName '$value') <'\n'> ] ) ) (redir op: <Id.Redir_DGreat '>>'> loc: (redir_loc.Fd fd:1) arg: {<'/DietPi/dietpi.txt'>} ) ] do_fork: T ) ] spids: [2342 2368] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<0>} {(DQ <'Verified: '> ($ Id.VSub_DollarName '$entry'))} ) ] ) ] spids: [2282 2295] ) ] ) ] ) redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {<'/tmp/dietpi.txt_patch'>} ) ] ) (C {<rm>} {<'/tmp/dietpi.txt_patch'>}) (C {<G_DIETPI-NOTIFY>} {<0>} {(DQ <'dietpi.txt verification completed'>)}) ] spids: [2198 2212] ) ] else_action: [ (C {<G_DIETPI-NOTIFY>} {<1>} { (DQ <'Failed to verify dietpi.txt, '> ($ Id.VSub_DollarName '$INSTALL_URL') <' is offline and/or inaccessible'> ) } ) ] ) ] ) ) (C {<G_DIETPI-NOTIFY>} {<3>} {<DietPi-Set_Software>} { (DQ ($ Id.VSub_DollarName '$INPUT_MODE_NAME') <' ('> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <')'> ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_NAME'))} {<Id.Lit_Equals '='>} {(DQ <apt-mirror>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<AptMirror_Main>})] spids: [2512 2529] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_NAME'))} {<Id.Lit_Equals '='>} {(DQ <useradd>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<Useradd_Main>})] spids: [2537 2554] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_NAME'))} {<Id.Lit_Equals '='>} {(DQ <userdel>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<Userdel_Main>})] spids: [2562 2579] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_NAME'))} {<Id.Lit_Equals '='>} {(DQ <ntpd-mirror>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<NtpdMirror_Main>})] spids: [2587 2604] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_NAME'))} {<Id.Lit_Equals '='>} {(DQ <ntpd-mode>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<NtpdMode_Main>})] spids: [2612 2629] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_NAME'))} {<Id.Lit_Equals '='>} {(DQ <allo>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<Allo_Main>})] spids: [2637 2654] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_NAME'))} {<Id.Lit_Equals '='>} {(DQ <verify_dietpi.txt>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<Verify_DietPi_Txt>})] spids: [2662 2679] ) (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName '$INPUT_MODE_NAME'))} {<Id.Lit_Equals '='>} {(SQ <locale>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<Locale_Main>})] spids: [2687 2704] ) ] else_action: [(C {<Unknown_Input_Name>})] ) (C {<G_DIETPI-NOTIFY>} {<-1>} {($ Id.VSub_DollarName '$EXIT_CODE')} { (DQ ($ Id.VSub_DollarName '$INPUT_MODE_NAME') <' '> ($ Id.VSub_DollarName '$INPUT_MODE_VALUE') <' |'> ) } ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {($ Id.VSub_DollarName '$EXIT_CODE')} ) ] )