(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:PATH) op: Equal rhs: {(/sbin) (Lit_Other ':') (/bin) (Lit_Other ':') (/usr/sbin) (Lit_Other ':') (/usr/bin)} ) ] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:DESC) op:Equal rhs:{(bluetooth)})] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:DAEMON) op:Equal rhs:{(/usr/sbin/bluetoothd)})] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:HCIATTACH) op:Equal rhs:{(/usr/bin/hciattach)})] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:BLUETOOTH_ENABLED) op:Equal rhs:{(0)})] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:HID2HCI_ENABLED) op:Equal rhs:{(1)})] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:HID2HCI_UNDO) op:Equal rhs:{(1)})] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:SDPTOOL) op:Equal rhs:{(/usr/bin/sdptool)})] ) (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:NOPLUGIN_OPTION) op:Equal rhs:{(DQ )})] ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:SSD_OPTIONS) op: Equal rhs: { (DQ ('--oknodo --quiet --exec ') ($ VSub_DollarName '$DAEMON') (' -- ') ($ VSub_DollarName '$NOPLUGIN_OPTION') ) } ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-f)} {($ VSub_DollarName '$DAEMON')}) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] ) (command.AndOr ops: [Op_DAmp] children: [(C {(test)} {(-f)} {(/etc/default/bluetooth)}) (C {(.)} {(/etc/default/bluetooth)})] ) (command.AndOr ops: [Op_DAmp] children: [(C {(test)} {(-f)} {(/etc/default/rcS)}) (C {(.)} {(/etc/default/rcS)})] ) (C {(.)} {(/lib/lsb/init-functions)}) (C {(set)} {(-e)}) (command.FuncDef name: run_sdptool body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_Local pairs: [ (assign_pair lhs:(lhs_expr.LhsName name:IFS) op:Equal) (assign_pair lhs:(lhs_expr.LhsName name:o) op:Equal) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {(-x)} {($ VSub_DollarName '$SDPTOOL')}) (command.ControlFlow token:<ControlFlow_Return return> arg_word:{(1)}) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$SDPTOOL_OPTIONS'))})] negated: T ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:IFS) op:Equal rhs:{(DQ (';'))})] ) (command.ForEach iter_name: o iter_words: [{($ VSub_DollarName '$SDPTOOL_OPTIONS')}] do_arg_iter: F body: (command.DoGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:IFS) op: Equal rhs: {(DQ (' '))} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_DollarName '$VERBOSE'))} {(KW_Bang '!') (Lit_Other '=')} {(no)} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {($ VSub_DollarName '$SDPTOOL')} {($ VSub_DollarName '$o')}) ] ) ] else_action: [ (command.SimpleCommand words: [{($ VSub_DollarName '$SDPTOOL')} {($ VSub_DollarName '$o')}] redirects: [ (redir.Redir op: <Redir_Great '>'> fd: 16777215 arg_word: {(/dev/null)} ) (redir.Redir op: <Redir_GreatAnd '2>&'> fd: 2 arg_word: {(1)} ) ] ) ] ) ] ) ) ] ) ] ) ] ) ) (command.FuncDef name: hci_input body: (command.BraceGroup children: [ (command.AndOr ops: [Op_DPipe] 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 ':')}) ] ) ] ) ) (C {(alias)} {(Lit_VarLike 'enable_hci_input=') (hci_input)}) (C {(alias)} {(Lit_VarLike 'disable_hci_input=') (hci_input)}) (command.Case to_match: {($ VSub_Number '$1')} arms: [ (case_arm pat_list: [{(start)}] action: [ (C {(log_daemon_msg)} {(DQ ('Starting ') ($ VSub_DollarName '$DESC'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(DQ ($ VSub_DollarName '$BLUETOOTH_ENABLED'))} {(Lit_Other '=')} {(0)} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_progress_msg)} {(DQ ('disabled. see /etc/default/bluetooth'))}) (C {(log_end_msg)} {(0)}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(0)} ) ] ) ] ) (C {(start-stop-daemon)} {(--start)} {(--background)} {($ VSub_DollarName '$SSD_OPTIONS')}) (C {(log_progress_msg)} { (DQ (word_part.BracedVarSub token: <VSub_Name DAEMON> suffix_op: (suffix_op.StringUnary op_id:VOp1_DPound arg_word:{('*') (Lit_Slash /)}) ) ) } ) (command.AndOr ops: [Op_DPipe] children: [(C {(run_sdptool)}) (C {(Lit_Other ':')})] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(DQ ($ VSub_DollarName '$HID2HCI_ENABLED'))} {(Lit_Other '=')} {(1)}) terminator: <Op_Semi ';'> ) ] action: [(C {(enable_hci_input)})] ) ] ) (C {(log_end_msg)} {(0)}) ] ) (case_arm pat_list: [{(stop)}] action: [ (C {(log_daemon_msg)} {(DQ ('Stopping ') ($ VSub_DollarName '$DESC'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(DQ ($ VSub_DollarName '$BLUETOOTH_ENABLED'))} {(Lit_Other '=')} {(0)} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(log_progress_msg)} {(DQ (disabled.))}) (C {(log_end_msg)} {(0)}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {(0)} ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {(DQ ($ VSub_DollarName '$HID2HCI_UNDO'))} {(Lit_Other '=')} {(1)}) terminator: <Op_Semi ';'> ) ] action: [(C {(disable_hci_input)})] ) ] ) (C {(start-stop-daemon)} {(--stop)} {($ VSub_DollarName '$SSD_OPTIONS')}) (C {(log_progress_msg)} {(DQ (${ VSub_Name DAEMON))}) (C {(log_end_msg)} {(0)}) ] ) (case_arm pat_list: [{(restart)} {(force-reload)}] action: [ (C {($ VSub_Number '$0')} {(stop)}) (C {(sleep)} {(1)}) (C {($ VSub_Number '$0')} {(start)}) ] ) (case_arm pat_list: [{(status)}] action: [ (command.AndOr ops: [Op_DAmp Op_DPipe] children: [ (C {(status_of_proc)} {(DQ ($ VSub_DollarName '$DAEMON'))} {(DQ ($ VSub_DollarName '$DESC'))} ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) (command.ControlFlow token: <ControlFlow_Exit exit> arg_word: {($ VSub_QMark '$?')} ) ] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:N) op: Equal rhs: {(/etc/init.d/bluetooth)} ) ] ) (command.SimpleCommand words: [ {(echo)} { (DQ ('Usage: ') ($ VSub_DollarName '$N') (' {start|stop|restart|force-reload|status}') ) } ] redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] ) ] ) (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )