(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH) op: assign_op.Equal rhs: {<'/sbin'> <Id.Lit_Colon ':'> <'/bin'> <Id.Lit_Colon ':'> <'/usr/bin'>} spids: [40] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FSCK_LOGFILE='> name:FSCK_LOGFILE) op: assign_op.Equal rhs: {<'/var/log/fsck/checkfs'>} spids: [47] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName FSCKFIX))} {<Id.Lit_RBracket ']'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FSCKFIX='> name:FSCKFIX) op: assign_op.Equal rhs: {<no>} spids: [60] ) ] redirects: [] ) ] ) (C {<.>} {<'/lib/init/vars.sh'>}) (C {<.>} {<'/lib/lsb/init-functions'>}) (C {<.>} {<'/lib/init/mount-functions.sh'>}) (C {<.>} {<'/lib/init/swap-functions.sh'>}) (command.ShFunction name: do_start body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (C {<trap>} {(DQ )} {<INT>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'BAT='> name:BAT) op: assign_op.Equal rhs: {(DQ )} spids: [148] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fscheck='> name:fscheck) op: assign_op.Equal rhs: {(DQ <yes>)} spids: [153] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands:[(C {<is_fastboot_active>})]) action: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName fscheck))} {<Id.Lit_Equals '='>} {<yes>} {<Id.Lit_RBracket ']'>} ) (C {<log_warning_msg>} {(DQ <'Fast boot enabled, so skipping file system check.'>)} ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fscheck='> name:fscheck) op: assign_op.Equal rhs: {<no>} spids: [189] ) ] redirects: [] ) ] spids: [160 165] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName fscheck))} {<Id.Lit_Equals '='>} {<yes>} {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {(DQ ($ Id.VSub_DollarName BAT))} {<Id.Lit_RBracket ']'>} ) (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName FSCKTYPES))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <none>)} {<Id.Lit_RBracket ']'>} ) ] ) ] ) action: [ (C {<swaponagain>} {(SQ <'lvm and md'>)}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<Id.Lit_LBracket '['>} {<-f>} {<'/forcefsck'>} {<Id.Lit_RBracket ']'>} ) (C {<grep>} {<-q>} {<-s>} {<-w>} {<-i>} {(DQ <forcefsck>)} {<'/proc/cmdline'>} ) ] ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'force='> name:force) op: assign_op.Equal rhs: {(DQ <-f>)} spids: [305] ) ] redirects: [] ) ] spids: [273 302] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'force='> name:force) op: assign_op.Equal rhs: {(DQ )} spids: [314] ) ] redirects: [] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName FSCKFIX))} {<Id.Lit_Equals '='>} {<yes>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fix='> name:fix) op: assign_op.Equal rhs: {(DQ <-y>)} spids: [340] ) ] redirects: [] ) ] spids: [322 337] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'fix='> name:fix) op: assign_op.Equal rhs: {(DQ <-a>)} spids: [349] ) ] redirects: [] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'spinner='> name:spinner) op: assign_op.Equal rhs: {(DQ <-C>)} spids: [358] ) ] redirects: [] ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName TERM))} arms: [ (case_arm pat_list: [{<dumb>} {<network>} {<unknown>} {(DQ )}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'spinner='> name: spinner ) op: assign_op.Equal rhs: {(DQ )} spids: [384] ) ] redirects: [] ) ] spids: [373 381 389 -1] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} { (DQ (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<uname>} {<-m>}) right: <Id.Eof_RParen _> ) ) } {<Id.Lit_Equals '='>} {<s390x>} {<Id.Lit_RBracket ']'>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'spinner='> name:spinner) op: assign_op.Equal rhs: {(DQ )} spids: [413] ) ] redirects: [] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'FSCKTYPES_OPT='> name: FSCKTYPES_OPT ) op: assign_op.Equal rhs: {(DQ )} spids: [421] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName FSCKTYPES))} {<Id.Lit_RBracket ']'>} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'FSCKTYPES_OPT='> name: FSCKTYPES_OPT ) op: assign_op.Equal rhs: {(DQ <'-t '> ($ Id.VSub_DollarName FSCKTYPES))} spids: [436] ) ] redirects: [] ) ] ) (command.ShFunction name: handle_failed_fsck body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (C {<log_failure_msg>} { (DQ <'File system check failed. \n'> <'A log is being saved in '> (${ Id.VSub_Name FSCK_LOGFILE) <' if that location is writable. \n'> <'Please repair the file system manually.'> ) } ) (C {<log_warning_msg>} { (DQ <'A maintenance shell will now be started. \n'> <'CONTROL-D will terminate this shell and resume system boot.'> ) } ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Pipeline children: [(C {<sulogin>} {($ Id.VSub_DollarName CONSOLE)})] negated: T stderr_indices: [] ) ] ) action: [ (C {<log_failure_msg>} { (DQ <'Attempt to start maintenance shell failed. \n'> <'Continuing with system boot in 5 seconds.'> ) } ) (C {<sleep>} {<5>}) ] spids: [475 484] ) ] else_action: [] redirects: [] ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName VERBOSE))} {<Id.Lit_Equals '='>} {<no>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<log_action_begin_msg>} {(DQ <'Checking file systems'>)}) (C {<logsave>} {<-s>} {($ Id.VSub_DollarName FSCK_LOGFILE)} {<fsck>} {($ Id.VSub_DollarName spinner)} {<-M>} {<-A>} {($ Id.VSub_DollarName fix)} {($ Id.VSub_DollarName force)} {($ Id.VSub_DollarName FSCKTYPES_OPT)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left: <Id.Lit_VarLike 'FSCKCODE='> name: FSCKCODE ) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} spids: [552] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName FSCKCODE))} {<-eq>} {<32>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<log_action_end_msg>} {<1>} {(DQ <'code '> ($ Id.VSub_DollarName FSCKCODE))} ) (C {<log_warning_msg>} {(DQ <'File system check was interrupted by user'>)} ) ] spids: [557 572] ) (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName FSCKCODE))} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<log_action_end_msg>} {<1>} {(DQ <'code '> ($ Id.VSub_DollarName FSCKCODE))} ) (C {<handle_failed_fsck>}) ] spids: [592 607] ) ] else_action: [(C {<log_action_end_msg>} {<0>})] redirects: [] ) ] spids: [506 521] ) ] else_action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName FSCKTYPES))} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<log_action_msg>} { (DQ <'Will now check all file systems of types '> ($ Id.VSub_DollarName FSCKTYPES) ) } ) ] spids: [637 648] ) ] else_action: [ (C {<log_action_msg>} {(DQ <'Will now check all file systems'>)}) ] redirects: [] ) (C {<logsave>} {<-s>} {($ Id.VSub_DollarName FSCK_LOGFILE)} {<fsck>} {($ Id.VSub_DollarName spinner)} {<-V>} {<-M>} {<-A>} {($ Id.VSub_DollarName fix)} {($ Id.VSub_DollarName force)} {($ Id.VSub_DollarName FSCKTYPES_OPT)} ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'FSCKCODE='> name:FSCKCODE) op: assign_op.Equal rhs: {($ Id.VSub_QMark '?')} spids: [695] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName FSCKCODE))} {<-eq>} {<32>} {<Id.Lit_RBracket ']'>} ) ] ) action: [ (C {<log_warning_msg>} {(DQ <'File system check was interrupted by user'>)} ) ] spids: [699 714] ) (if_arm cond: (condition.Shell commands: [ (C {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName FSCKCODE))} {<-gt>} {<1>} {<Id.Lit_RBracket ']'>} ) ] ) action: [(C {<handle_failed_fsck>})] spids: [724 739] ) ] else_action: [ (C {<log_success_msg>} { (DQ <'Done checking file systems. \n'> <'A log is being saved in '> (${ Id.VSub_Name FSCK_LOGFILE) <' if that location is writable.'> ) } ) ] redirects: [] ) ] redirects: [] ) ] spids: [209 253] ) ] else_action: [] redirects: [] ) (command.Simple words: [{<rm>} {<-f>} {<'/fastboot'>} {<'/forcefsck'>}] redirects: [(redir op:<Id.Redir_Great '2>'> loc:(redir_loc.Fd fd:2) arg:{<'/dev/null'>})] more_env: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Case to_match: {(DQ ($ Id.VSub_Number 1))} arms: [ (case_arm pat_list: [{<start>} {(DQ )}] action: [(C {<do_start>})] spids: [792 796 802 -1] ) (case_arm pat_list: [{<restart>} {<reload>} {<force-reload>}] action: [ (command.Simple words: [{<echo>} {(DQ <'Error: argument \''> ($ Id.VSub_Number 1) <'\' not supported'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] more_env: [] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>}) ] spids: [805 810 830 -1] ) (case_arm pat_list:[{<stop>} {<status>}] action:[] spids:[833 836 843 -1]) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.Simple words: [{<echo>} {(DQ <'Usage: checkfs.sh [start|stop]'>)}] redirects: [(redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] more_env: [] do_fork: T ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<3>}) ] spids: [846 847 865 -1] ) ] redirects: [] ) (C {<Id.Lit_Colon ':'>}) ] )