(command.CommandList children: [ (C {<.>} {<'/lib/lsb/init-functions'>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'PATH='> name:PATH) op: assign_op.Equal rhs: {<'/usr/local/sbin'> <Id.Lit_Colon ':'> <'/usr/local/bin'> <Id.Lit_Colon ':'> <'/sbin'> <Id.Lit_Colon ':'> <'/bin'> <Id.Lit_Colon ':'> <'/usr/sbin'> <Id.Lit_Colon ':'> <'/usr/bin'> } spids: [48] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DAEMON='> name:DAEMON) op: assign_op.Equal rhs: {<'/usr/sbin/saned'>} spids: [61] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'NAME='> name:NAME) op: assign_op.Equal rhs: {<saned>} spids: [64] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DESC='> name:DESC) op: assign_op.Equal rhs: {(DQ <'SANE network scanner server'>)} spids: [67] ) ] redirects: [] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {<test>} {<-x>} {($ Id.VSub_DollarName DAEMON)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RUN='> name:RUN) op: assign_op.Equal rhs: {<no>} spids: [86] ) ] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RUN_AS_USER='> name:RUN_AS_USER) op: assign_op.Equal rhs: {<saned>} spids: [89] ) ] redirects: [] ) (C {<.>} {<'/lib/lsb/init-functions'>}) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-f>} {<'/etc/default/saned'>} {<Id.Lit_RBracket ']'>}) terminator: <Id.Op_Semi _> ) ] ) action: [(C {<.>} {<'/etc/default/saned'>})] spids: [104 116] ) ] else_action: [] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {(DQ <x> ($ Id.VSub_DollarName RUN))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ <xyes>)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<log_success_msg>} {(DQ ($ Id.VSub_DollarName NAME) <' disabled; edit /etc/default/saned'>)} ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] spids: [126 146] ) ] else_action: [] redirects: [] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'DAEMON_OPTS='> name:DAEMON_OPTS) op: assign_op.Equal rhs: {(DQ <'-a '> ($ Id.VSub_DollarName RUN_AS_USER))} spids: [164] ) ] redirects: [] ) (C {<set>} {<-e>}) (command.Case to_match: {(DQ ($ Id.VSub_Number 1))} arms: [ (case_arm pat_list: [{<start>}] action: [ (C {<log_daemon_msg>} {(DQ <'Starting '> ($ Id.VSub_DollarName DESC))} {(DQ ($ Id.VSub_DollarName NAME))} ) (C {<start-stop-daemon>} {<--start>} {<--quiet>} {<--pidfile>} {<'/var/run/'> ($ Id.VSub_DollarName NAME) <.pid>} {<--exec>} {($ Id.VSub_DollarName DAEMON)} {<-->} {($ Id.VSub_DollarName DAEMON_OPTS)} ) (C {<log_end_msg>} {($ Id.VSub_QMark '?')}) ] spids: [185 186 229 -1] ) (case_arm pat_list: [{<stop>}] action: [ (C {<log_daemon_msg>} {(DQ <'Stopping '> ($ Id.VSub_DollarName DESC))} {(DQ ($ Id.VSub_DollarName NAME))} ) (C {<start-stop-daemon>} {<--stop>} {<--oknodo>} {<--quiet>} {<--pidfile>} {<'/var/run/'> ($ Id.VSub_DollarName NAME) <.pid>} {<--exec>} {($ Id.VSub_DollarName DAEMON)} ) (C {<log_end_msg>} {($ Id.VSub_QMark '?')}) ] spids: [232 233 274 -1] ) (case_arm pat_list: [{<force-reload>}] action: [ (command.AndOr ops: [Id.Op_DAmp Id.Op_DPipe] children: [ (C {<start-stop-daemon>} {<--stop>} {<--test>} {<--quiet>} {<--pidfile>} {<'/var/run/'> ($ Id.VSub_DollarName NAME) <.pid>} {<--exec>} {($ Id.VSub_DollarName DAEMON)} ) (C {($ Id.VSub_Number 0)} {<restart>}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] ) ] spids: [277 278 322 -1] ) (case_arm pat_list: [{<restart>}] action: [ (C {<log_daemon_msg>} {(DQ <'Restarting '> ($ Id.VSub_DollarName DESC))} {(DQ ($ Id.VSub_DollarName NAME))} ) (C {<start-stop-daemon>} {<--stop>} {<--oknodo>} {<--quiet>} {<--pidfile>} {<'/var/run/'> ($ Id.VSub_DollarName NAME) <.pid>} {<--exec>} {($ Id.VSub_DollarName DAEMON)} ) (C {<sleep>} {<1>}) (C {<start-stop-daemon>} {<--start>} {<--quiet>} {<--pidfile>} {<'/var/run/'> ($ Id.VSub_DollarName NAME) <.pid>} {<--exec>} {($ Id.VSub_DollarName DAEMON)} {<-->} {($ Id.VSub_DollarName DAEMON_OPTS)} ) (C {<log_end_msg>} {($ Id.VSub_QMark '?')}) ] spids: [325 326 395 -1] ) (case_arm pat_list: [{<status>}] action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-s>} {<'/var/run/'> ($ Id.VSub_DollarName NAME) <.pid>} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'RUNNING='> name:RUNNING) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<cat>} {<'/var/run/'> ($ Id.VSub_DollarName NAME) <.pid>}) right: <Id.Eof_RParen _> ) } spids: [418] ) ] redirects: [] ) (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} {<-d>} {<'/proc/'> ($ Id.VSub_DollarName RUNNING)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (command.If arms: [ (if_arm cond: (condition.Shell commands: [ (command.Sentence child: (C {<Id.Lit_LBracket '['>} { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<readlink>} {<'/proc/'> ($ Id.VSub_DollarName RUNNING) <'/exe'> } ) right: <Id.Eof_RParen _> ) } {<Id.Lit_Equals '='>} {($ Id.VSub_DollarName DAEMON)} {<Id.Lit_RBracket ']'>} ) terminator: <Id.Op_Semi _> ) ] ) action: [ (C {<log_success_msg>} {(DQ ($ Id.VSub_DollarName NAME) <' is running'>)} ) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<0>} ) ] spids: [443 462] ) ] else_action: [] redirects: [] ) ] spids: [428 440] ) ] else_action: [] redirects: [] ) (C {<log_failure_msg>} {(DQ ($ Id.VSub_DollarName NAME) <' is not running, but pidfile existed'>)} ) (C {<rm>} {<'/var/run/'> ($ Id.VSub_DollarName NAME) <.pid>}) (command.ControlFlow token: <Id.ControlFlow_Exit exit> arg_word: {<1>} ) ] spids: [402 415] ) ] else_action: [ (C {<rm>} {<-f>} {<'/var/run/'> ($ Id.VSub_DollarName NAME) <.pid>}) (C {<log_failure_msg>} {(DQ ($ Id.VSub_DollarName NAME) <' not running'>)}) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] redirects: [] ) ] spids: [398 399 537 -1] ) (case_arm pat_list: [{<Id.Lit_Star '*'>}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'N='> name:N) op: assign_op.Equal rhs: {<'/etc/init.d/'> ($ Id.VSub_DollarName NAME)} spids: [544] ) ] redirects: [] ) (C {<log_failure_msg>} {(DQ <'Usage: '> ($ Id.VSub_DollarName N) <' {start|stop|restart|force-reload}'>)} ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [540 541 563 -1] ) ] redirects: [] ) (command.ControlFlow token:<Id.ControlFlow_Exit exit> arg_word:{<0>}) ] )