(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:PATH) rhs: {(/sbin) (Lit_Other ":") (/bin) (Lit_Other ":") (/usr/sbin) (Lit_Other ":") (/usr/bin)} spids: [64] ) ] spids: [64] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:DESC) rhs:{(bluetooth)} spids:[73])] spids: [73] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:DAEMON) rhs:{(/usr/sbin/bluetoothd)} spids:[77])] spids: [77] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:HCIATTACH) rhs:{(/usr/sbin/hciattach)} spids:[80])] spids: [80] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:HID2HCI_ENABLED) rhs:{(1)} spids:[84])] spids: [84] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:HID2HCI_UNDO) rhs:{(1)} spids:[87])] spids: [87] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:UART_CONF) rhs:{(/etc/bluetooth/uart)} spids:[91])] spids: [91] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:RFCOMM_NAME) rhs:{(rfcomm)} spids:[95])] spids: [95] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:RFCOMM) rhs: {(/usr/bin/) ($ VSub_Name "$RFCOMM_NAME")} spids: [98] ) ] spids: [98] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:RFCOMM_CONF) rhs: {(/etc/bluetooth/) ($ VSub_Name "$RFCOMM_NAME") (.conf)} spids: [102] ) ] spids: [102] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:SDPTOOL) rhs:{(/usr/bin/sdptool)} spids:[107])] spids: [107] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:SSD_OPTIONS) rhs: {(DQ ("--oknodo --quiet --exec ") ($ VSub_Name "$DAEMON"))} spids: [111] ) ] spids: [111] ) (AndOr children: [(C {(test)} {(-f)} {($ VSub_Name "$DAEMON")}) (C {(exit)} {(0)})] op_id: Op_DPipe ) (AndOr children: [(C {(test)} {(-f)} {(/etc/default/bluetooth)}) (C {(.)} {(/etc/default/bluetooth)})] op_id: Op_DAmp ) (AndOr children: [(C {(test)} {(-f)} {(/etc/default/rcS)}) (C {(.)} {(/etc/default/rcS)})] op_id: Op_DAmp ) (C {(.)} {(/lib/lsb/init-functions)}) (C {(set)} {(-e)}) (FuncDef name: run_sdptool body: (BraceGroup children: [ (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs:(LeftVar name:IFS) spids:[189]) (assign_pair lhs:(LeftVar name:o) spids:[191]) ] spids: [187] ) (AndOr children: [(C {(test)} {(-x)} {($ VSub_Name "$SDPTOOL")}) (C {(return)} {(1)})] op_id: Op_DPipe ) (If arms: [ (if_arm cond: (Sentence command: (Pipeline children: [(C {(test)} {(-z)} {(DQ ($ VSub_Name "$SDPTOOL_OPTIONS"))})] negated: True ) terminator: <Op_Semi ";"> ) action: (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LeftVar name:IFS) rhs:{(DQ (";"))} spids:[229])] spids: [229] ) (ForEach iter_name: o iter_words: [{($ VSub_Name "$SDPTOOL_OPTIONS")}] do_arg_iter: False body: (DoGroup child: (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:IFS) rhs: {(DQ (" "))} spids: [252] ) ] spids: [252] ) (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) action: (C {($ VSub_Name "$SDPTOOL")} {($ VSub_Name "$o")}) spids: [-1 274] ) ] else_action: (SimpleCommand words: [{($ VSub_Name "$SDPTOOL")} {($ VSub_Name "$o")}] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/dev/null)} fd: -1 spids: [289] ) (Redirect op_id: Redir_GreatAnd arg_word: {(1)} fd: 2 spids: [292] ) ] ) spids: [282 296] ) ] ) spids: [245 299] ) spids: [240 243] ) ] ) spids: [-1 226] ) ] spids: [-1 302] ) ] spids: [176] ) spids: [172 175] ) (FuncDef name: hci_input body: (BraceGroup children: [ (AndOr children: [ (C {(log_progress_msg)} { (DQ ( "switching to HID/HCI no longer done in init script, see /usr/share/doc/bluez/NEWS.Debian.gz" ) ) } ) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) ] spids: [311] ) spids: [307 310] ) (C {(alias)} {(Lit_VarLike "enable_hci_input=") (hci_input)}) (C {(alias)} {(Lit_VarLike "disable_hci_input=") (hci_input)}) (FuncDef name: start_uarts body: (BraceGroup children: [ (AndOr children: [ (C {(Lit_Other "[")} {(-f)} {($ VSub_Name "$HCIATTACH")} {(Lit_Other "]")}) (AndOr children: [ (C {(Lit_Other "[")} {(-f)} {($ VSub_Name "$UART_CONF")} {(Lit_Other "]")}) (C {(return)}) ] op_id: Op_DPipe ) ] op_id: Op_DAmp ) (Pipeline children: [ (C {(grep)} {(-v)} {(SQ <"^#">)} {($ VSub_Name "$UART_CONF")}) (While cond: (Sentence command:(C {(read)} {(i)}) terminator:<Op_Semi ";">) body: (DoGroup child: (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) action: (C {($ VSub_Name "$HCIATTACH")} {($ VSub_Name "$i")}) spids: [-1 405] ) ] else_action: (SimpleCommand words: [{($ VSub_Name "$HCIATTACH")} {($ VSub_Name "$i")}] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/dev/null)} fd: -1 spids: [420] ) (Redirect op_id: Redir_GreatAnd arg_word: {(1)} fd: 2 spids: [423] ) ] ) spids: [413 427] ) spids: [386 430] ) ) ] negated: False ) ] spids: [341] ) spids: [337 340] ) (FuncDef name: stop_uarts body: (BraceGroup children: [ (AndOr children: [ (SimpleCommand words: [ {(killall)} { (BracedVarSub token: <VSub_Name HCIATTACH> suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)}) spids: [444 449] ) } ] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/dev/null)} fd: -1 spids: [451] ) (Redirect op_id: Redir_GreatAnd arg_word: {(1)} fd: 2 spids: [454] ) ] ) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) ] spids: [439] ) spids: [435 438] ) (FuncDef name: start_rfcomm body: (BraceGroup children: [ (If arms: [ (if_arm cond: (Sentence command: (AndOr children: [ (C {(Lit_Other "[")} {(-x)} {($ VSub_Name "$RFCOMM")} {(Lit_Other "]")}) (C {(Lit_Other "[")} {(-f)} {($ VSub_Name "$RFCOMM_CONF")} {(Lit_Other "]")}) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) action: (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) action: (CommandList children: [ (C {(log_progress_msg)} { (DQ (BracedVarSub token: <VSub_Name RFCOMM> suffix_op: (StringUnary op_id: VOp1_DPound arg_word: {("*") (Lit_Slash /)} ) spids: [526 531] ) ) } ) (AndOr children: [ (C {($ VSub_Name "$RFCOMM")} {(-f)} {($ VSub_Name "$RFCOMM_CONF")} {(bind)} {(all)} ) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) ] ) spids: [-1 520] ) ] else_action: (AndOr children: [ (SimpleCommand words: [ {($ VSub_Name "$RFCOMM")} {(-f)} {($ VSub_Name "$RFCOMM_CONF")} {(bind)} {(all)} ] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/dev/null)} fd: -1 spids: [563] ) (Redirect op_id: Redir_GreatAnd arg_word: {(1)} fd: 2 spids: [566] ) ] ) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) spids: [550 574] ) spids: [-1 493] ) ] spids: [-1 577] ) ] spids: [468] ) spids: [464 467] ) (FuncDef name: stop_rfcomm body: (BraceGroup children: [ (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(-x)} {($ VSub_Name "$RFCOMM")} {(Lit_Other "]")}) terminator: <Op_Semi ";"> ) action: (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) action: (CommandList children: [ (C {(log_progress_msg)} { (DQ (BracedVarSub token: <VSub_Name RFCOMM> suffix_op: (StringUnary op_id: VOp1_DPound arg_word: {("*") (Lit_Slash /)} ) spids: [626 631] ) ) } ) (AndOr children: [ (C {($ VSub_Name "$RFCOMM")} {(unbind)} {(all)}) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) ] ) spids: [-1 620] ) ] else_action: (AndOr children: [ (SimpleCommand words: [{($ VSub_Name "$RFCOMM")} {(unbind)} {(all)}] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/dev/null)} fd: -1 spids: [655] ) (Redirect op_id: Redir_GreatAnd arg_word: {(1)} fd: 2 spids: [658] ) ] ) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) spids: [646 666] ) spids: [-1 601] ) ] spids: [-1 669] ) ] spids: [586] ) spids: [582 585] ) (FuncDef name: restart_rfcomm body: (BraceGroup children: [ (If arms: [ (if_arm cond: (Sentence command: (AndOr children: [ (C {(Lit_Other "[")} {(-x)} {($ VSub_Name "$RFCOMM")} {(Lit_Other "]")}) (C {(Lit_Other "[")} {(-f)} {($ VSub_Name "$RFCOMM_CONF")} {(Lit_Other "]")}) ] op_id: Op_DAmp ) terminator: <Op_Semi ";"> ) action: (If arms: [ (if_arm cond: (Sentence command: (C {(Lit_Other "[")} {(DQ ($ VSub_Name "$VERBOSE"))} {(KW_Bang "!") (Lit_Other "=")} {(no)} {(Lit_Other "]")} ) terminator: <Op_Semi ";"> ) action: (CommandList children: [ (C {(log_progress_msg)} { (DQ (BracedVarSub token: <VSub_Name RFCOMM> suffix_op: (StringUnary op_id: VOp1_DPound arg_word: {("*") (Lit_Slash /)} ) spids: [728 733] ) ) } ) (AndOr children: [ (C {($ VSub_Name "$RFCOMM")} {(unbind)} {(all)}) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) (AndOr children: [ (C {($ VSub_Name "$RFCOMM")} {(-f)} {($ VSub_Name "$RFCOMM_CONF")} {(bind)} {(all)} ) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) ] ) spids: [-1 722] ) ] else_action: (CommandList children: [ (AndOr children: [ (SimpleCommand words: [{($ VSub_Name "$RFCOMM")} {(unbind)} {(all)}] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/dev/null)} fd: -1 spids: [772] ) (Redirect op_id: Redir_GreatAnd arg_word: {(1)} fd: 2 spids: [775] ) ] ) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) (AndOr children: [ (SimpleCommand words: [ {($ VSub_Name "$RFCOMM")} {(-f)} {($ VSub_Name "$RFCOMM_CONF")} {(bind)} {(all)} ] redirects: [ (Redirect op_id: Redir_Great arg_word: {(/dev/null)} fd: -1 spids: [792] ) (Redirect op_id: Redir_GreatAnd arg_word: {(1)} fd: 2 spids: [795] ) ] ) (C {(Lit_Other ":")}) ] op_id: Op_DPipe ) ] ) spids: [763 803] ) spids: [-1 703] ) ] spids: [-1 806] ) ] spids: [678] ) spids: [674 677] ) (Case to_match: {($ VSub_Number "$1")} arms: [ (case_arm pat_list: [{(start)}] action: (CommandList children: [ (C {(log_daemon_msg)} {(DQ ("Starting ") ($ VSub_Name "$DESC"))}) (If arms: [ (if_arm cond: (Sentence command: (C {(test)} {(DQ ($ VSub_Name "$BLUETOOTH_ENABLED"))} {(Lit_Other "=")} {(0)}) terminator: <Op_Semi ";"> ) action: (CommandList children: [ (C {(log_progress_msg)} {(DQ ("disabled. see /etc/default/bluetooth"))}) (C {(log_end_msg)} {(0)}) (C {(exit)} {(0)}) ] ) spids: [-1 844] ) ] spids: [-1 864] ) (C {(start-stop-daemon)} {(--start)} {($ VSub_Name "$SSD_OPTIONS")}) (C {(log_progress_msg)} { (DQ (BracedVarSub token: <VSub_Name DAEMON> suffix_op: (StringUnary op_id:VOp1_DPound arg_word:{("*") (Lit_Slash /)}) spids: [878 883] ) ) } ) (AndOr children: [(C {(run_sdptool)}) (C {(Lit_Other ":")})] op_id: Op_DPipe ) (AndOr children: [(C {(start_uarts)}) (C {(Lit_Other ":")})] op_id: Op_DPipe ) (If arms: [ (if_arm cond: (Sentence command: (C {(test)} {(DQ ($ VSub_Name "$HID2HCI_ENABLED"))} {(Lit_Other "=")} {(1)}) terminator: <Op_Semi ";"> ) action: (C {(enable_hci_input)}) spids: [-1 917] ) ] spids: [-1 923] ) (AndOr children: [(C {(start_rfcomm)}) (C {(Lit_Other ":")})] op_id: Op_DPipe ) (If arms: [ (if_arm cond: (Sentence command: (AndOr children: [ (C {(test)} {(DQ ($ VSub_Name "$HIDD_ENABLED"))} {(Lit_Other "=")} {(1)}) (AndOr children: [ (C {(test)} {(DQ ($ VSub_Name "$PAND_ENABLED"))} {(Lit_Other "=")} {(1)} ) (C {(test)} {(DQ ($ VSub_Name "$DUND_ENABLED"))} {(Lit_Other "=")} {(1)} ) ] op_id: Op_DPipe ) ] op_id: Op_DPipe ) terminator: <Op_Semi ";"> ) action: (C {(log_progress_msg)} {(DQ ("compatibily daemons not started, see bluez-compat package"))} ) spids: [-1 972] ) ] spids: [-1 982] ) (C {(log_end_msg)} {(0)}) ] ) spids: [818 819 991 -1] ) (case_arm pat_list: [{(stop)}] action: (CommandList children: [ (C {(log_daemon_msg)} {(DQ ("Stopping ") ($ VSub_Name "$DESC"))}) (If arms: [ (if_arm cond: (Sentence command: (C {(test)} {(DQ ($ VSub_Name "$BLUETOOTH_ENABLED"))} {(Lit_Other "=")} {(0)}) terminator: <Op_Semi ";"> ) action: (CommandList children: [ (C {(log_progress_msg)} {(DQ (disabled.))}) (C {(log_end_msg)} {(0)}) (C {(exit)} {(0)}) ] ) spids: [-1 1019] ) ] spids: [-1 1039] ) (AndOr children: [(C {(stop_rfcomm)}) (C {(Lit_Other ":")})] op_id: Op_DPipe ) (If arms: [ (if_arm cond: (Sentence command: (C {(test)} {(DQ ($ VSub_Name "$HID2HCI_UNDO"))} {(Lit_Other "=")} {(1)}) terminator: <Op_Semi ";"> ) action: (C {(disable_hci_input)}) spids: [-1 1062] ) ] spids: [-1 1068] ) (C {(start-stop-daemon)} {(--stop)} {($ VSub_Name "$SSD_OPTIONS")}) (C {(log_progress_msg)} {(DQ (${ VSub_Name DAEMON))}) (AndOr children: [(C {(stop_uarts)}) (C {(Lit_Other ":")})] op_id: Op_DPipe ) (C {(log_end_msg)} {(0)}) ] ) spids: [994 995 1099 -1] ) (case_arm pat_list: [{(restart)} {(force-reload)}] action: (CommandList children: [ (C {($ VSub_Number "$0")} {(stop)}) (C {(sleep)} {(1)}) (C {($ VSub_Number "$0")} {(start)}) ] ) spids: [1102 1105 1123 -1] ) (case_arm pat_list: [{(status)}] action: (AndOr children: [ (C {(status_of_proc)} {(DQ ($ VSub_Name "$DAEMON"))} {(DQ ($ VSub_Name "$DESC"))}) (AndOr children: [(C {(exit)} {(0)}) (C {(exit)} {($ VSub_QMark "$?")})] op_id: Op_DPipe ) ] op_id: Op_DAmp ) spids: [1126 1127 1153 -1] ) (case_arm pat_list: [{(Lit_Other "*")}] action: (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LeftVar name:N) rhs: {(/etc/init.d/bluetooth)} spids: [1160] ) ] spids: [1160] ) (SimpleCommand words: [ {(echo)} { (DQ ("Usage: ") ($ VSub_Name "$N") (" {start|stop|restart|force-reload|status}")) } ] redirects: [(Redirect op_id:Redir_GreatAnd arg_word:{(2)} fd:-1 spids:[1172])] ) (C {(exit)} {(1)}) ] ) spids: [1156 1157 1181 -1] ) ] spids: [811 815 1183] ) (C {(exit)} {(0)}) ] )