(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PATH) op: Equal rhs: {(/sbin) (Lit_Other ":") (/bin)} spids: [31] ) ] spids: [31] ) (C {(.)} {(/lib/init/vars.sh)}) (C {(.)} {(/lib/lsb/init-functions)}) (FuncDef name: do_stop body: (BraceGroup children: [ (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(Lit_Other "=")} {(no)} {(Lit_Other "]")} ) (C {(log_action_begin_msg)} {(DQ ("Mounting root filesystem read-only"))}) ] op_id: Op_DPipe ) (If arms: [ (if_arm cond: [(C {(Lit_Other "[")} {(-f)} {(/var/run/init.upgraded)} {(Lit_Other "]")})] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:old_map) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(cat)} {(/proc/1/maps)})]) left_token: <Left_CommandSub "$("> spids: [102 108] ) } spids: [101] ) ] spids: [101] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:map) op: Equal rhs: {($ VSub_Name "$old_map")} spids: [111] ) ] spids: [111] ) (AndOr children: [(C {(telinit)} {(u)}) (C {(Lit_Other ":")})] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:i) op:Equal rhs:{(0)} spids:[124])] spids: [124] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:timeout) op:Equal rhs:{(5)} spids:[128])] spids: [128] ) (While cond: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$map"))} {(Lit_Other "=")} {(DQ ($ VSub_Name "$old_map"))} {(Lit_Other "]")} ) ] body: (DoGroup children: [ (C {(sleep)} {(1)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:map) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [(C {(cat)} {(/proc/1/maps)})] ) left_token: <Left_CommandSub "$("> spids: [158 164] ) } spids: [157] ) ] spids: [157] ) (C {(/usr/bin/logger)} {(DQ ("waiting for init to respawn"))}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:i) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Plus left: (ArithVarRef name:i) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [175 180] ) } spids: [174] ) ] spids: [174] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {($ VSub_Name "$i")} {(-eq)} {($ VSub_Name "$timeout")} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [(ControlFlow token:<ControlFlow_Break break>)] spids: [-1 197] ) ] spids: [-1 203] ) ] spids: [149 206] ) ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$map"))} {(Lit_Other "=")} {(DQ ($ VSub_Name "$old_map"))} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) ] action: [ (C {(/usr/bin/logger)} { (DQ ("FAIL: init failed to respawn in ") ($ VSub_Name "$timeout") (" seconds - unmounting anyway") ) } ) ] spids: [-1 228] ) ] else_action: [ (C {(/usr/bin/logger)} { (DQ ("SUCCESS: init respawned after ") ($ VSub_Name "$i") (" seconds (within ") ($ VSub_Name "$timeout") (" seconds timeout)") ) } ) ] spids: [240 254] ) ] spids: [-1 98] ) ] spids: [-1 257] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MOUNT_FORCE_OPT) op: Equal rhs: {(SQ )} spids: [261] ) ] spids: [261] ) (AndOr children: [ (C {(Lit_Other "[")} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(uname)} {(-s)})]) left_token: <Left_CommandSub "$("> spids: [267 271] ) ) } {(Lit_Other "=")} {(DQ (GNU/kFreeBSD))} {(Lit_Other "]")} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MOUNT_FORCE_OPT) op: Equal rhs: {(-f)} spids: [284] ) ] spids: [284] ) ] op_id: Op_DAmp ) (AndOr children: [ (SimpleCommand words: [ {(mount)} {($ VSub_Name "$MOUNT_FORCE_OPT")} {(-n)} {(-o)} {(remount) (Lit_Comma ",") (ro)} {(-t)} {(dummytype)} {(dummydev)} {(/)} ] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[324])] ) (AndOr children: [ (SimpleCommand words: [ {(mount)} {($ VSub_Name "$MOUNT_FORCE_OPT")} {(-n)} {(-o)} {(remount) (Lit_Comma ",") (ro)} {(dummydev)} {(/)} ] redirects: [(Redir op_id:Redir_Great fd:2 arg_word:{(/dev/null)} spids:[347])] ) (C {(mount)} {($ VSub_Name "$MOUNT_FORCE_OPT")} {(-n)} {(-o)} {(remount) (Lit_Comma ",") (ro)} {(/)} ) ] op_id: Op_DPipe ) ] op_id: Op_DPipe ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ES) op: Equal rhs: {($ VSub_QMark "$?")} spids: [369] ) ] spids: [369] ) (AndOr children: [ (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(Lit_Other "=")} {(no)} {(Lit_Other "]")} ) (C {(log_action_end_msg)} {($ VSub_Name "$ES")}) ] op_id: Op_DPipe ) ] spids: [51] ) spids: [46 50] ) (Case to_match: {(DQ ($ VSub_Number "$1"))} arms: [ (case_arm pat_list:[{(start)}{(status)}] spids:[403406413-1]) (case_arm pat_list: [{(restart)} {(reload)} {(force-reload)}] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Error: argument '") ($ VSub_Number "$1") ("' not supported"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[432])] ) (C {(exit)} {(3)}) ] spids: [416 421 441 -1] ) (case_arm pat_list:[{(stop)}] action:[(C {(do_stop)})] spids:[444445451-1]) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (SimpleCommand words: [{(echo)} {(DQ ("Usage: ") ($ VSub_Number "$0") (" start|stop"))}] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[466])] ) (C {(exit)} {(3)}) ] spids: [454 455 475 -1] ) ] spids: [394 400 477] ) (C {(Lit_Other ":")}) ] )