(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BADYEAR) op: assign_op.Equal rhs: {(no)} spids: [83] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HWCLOCKACCESS) op: assign_op.Equal rhs: {(yes)} spids: [86] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HWCLOCKPARS) op: assign_op.Equal rhs: (word.Empty) spids: [89] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:HCTOSYS_DEVICE) op: assign_op.Equal rhs: {(rtc0)} spids: [91] ) ] ) (C {(unset)} {(TZ)}) (command.ShFunction name: hwclocksh body: (command.BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-x)} {(/sbin/hwclock)} {(Id.Lit_RBracket ']')} ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:125) arg_word: {(0)} ) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-r)} {(/etc/default/rcS)} {(Id.Lit_RBracket ']')} ) (C {(.)} {(/etc/default/rcS)}) ] ) (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-r)} {(/etc/default/hwclock)} {(Id.Lit_RBracket ']')} ) (C {(.)} {(/etc/default/hwclock)}) ] ) (C {(.)} {(/lib/lsb/init-functions)}) (command.ShFunction name: verbose_log_action_msg body: (command.BraceGroup children: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$VERBOSE'))} {(Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')} ) (C {(log_action_msg)} {(DQ ($ Id.VSub_At '$@'))}) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:195) ) ] ) ) (command.Case to_match: {(DQ ($ Id.VSub_DollarName '$BADYEAR'))} arms: [ (case_arm pat_list: [{(no)} {(DQ )}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BADYEAR) op: assign_op.Equal rhs: {(DQ )} spids: [216] ) ] ) ] spids: [210 214 220 -1] ) (case_arm pat_list: [{(yes)}] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:BADYEAR) op: assign_op.Equal rhs: {(DQ (--badyear))} spids: [226] ) ] ) ] spids: [223 224 231 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (command.Sentence child: (C {(log_action_msg)} { (DQ ('unknown BADYEAR setting: ') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:241) ) ($ Id.VSub_DollarName '$BADYEAR') (word_part.EscapedLiteral token: (Token id:Id.Lit_EscapedChar val:'\\"' span_id:243) ) ) } ) terminator: (Token id:Id.Op_Semi val:';' span_id:245) ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:247) arg_word: {(1)} ) ] spids: [234 235 251 -1] ) ] ) (command.Case to_match: {(DQ ($ Id.VSub_Number '$1'))} arms: [ (case_arm pat_list: [{(start)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {(Id.Lit_LBracket '[')} {(-w)} {(/etc)} {(Id.Lit_RBracket ']')}) (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-f)} {(/etc/adjtime)} {(Id.Lit_RBracket ']')} ) (C {(Id.Lit_LBracket '[')} {(Id.KW_Bang '!')} {(-e)} {(/etc/adjtime)} {(Id.Lit_RBracket ']')} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:312) ) ] action: [ (command.Simple words: [ {(printf)} { (DQ ('0.0 0 0.0') (Id.Lit_Other '\\') (n0) (Id.Lit_Other '\\') (nUTC) (Id.Lit_Other '\\') (n) ) } ] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:329) fd: -1 arg_word: {(/etc/adjtime)} ) ] ) ] spids: [279 314] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Id.Op_DPipe] children: [ (C {(Id.Lit_LBracket '[')} {(-d)} {(/run/udev)} {(Id.Lit_RBracket ']')} ) (C {(Id.Lit_LBracket '[')} {(-d)} {(/dev/.udev)} {(Id.Lit_RBracket ']')} ) ] ) terminator: (Token id:Id.Op_Semi val:';' span_id:357) ) ] action: [ (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:362) arg_word: {(0)} ) ] spids: [338 359] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$HWCLOCKACCESS'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:385) ) ] action: [ (C {(log_action_msg)} {(DQ ('Setting the system clock'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.Pipeline children: [ (C {(sed)} {(SQ (Token id:Id.Lit_Chars val:'3!d' span_id:407))} {(/etc/adjtime)} ) (C {(grep)} {(-q)} {(SQ (Token id:Id.Lit_Chars val:'^UTC$' span_id:419))} ) ] negated: F ) terminator: (Token id:Id.Op_Semi val:';' span_id:421) ) ] action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:UTC) op: assign_op.Equal rhs: {(DQ (--utc))} spids: [426] ) ] ) ] spids: [402 423] ) ] else_action: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:UTC) op: assign_op.Equal rhs: (word.Empty) spids: [435] ) ] ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(/sbin/hwclock)} {(--rtc) (Id.Lit_Equals '=') (/dev/) ($ Id.VSub_DollarName '$HCTOSYS_DEVICE') } {(--hctosys)} {($ Id.VSub_DollarName '$HWCLOCKPARS')} {($ Id.VSub_DollarName '$BADYEAR')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:467) ) ] action: [ (C {(verbose_log_action_msg)} { (DQ ('System Clock set to: ') (command_sub left_token: (Token id: Id.Left_Backtick val: '`' span_id: 480 ) command_list: (command.CommandList children: [(C {(date)} {($ Id.VSub_DollarName '$UTC')})] ) ) ) } ) ] spids: [453 469] ) ] else_action: [ (C {(log_warning_msg)} { (DQ ('Unable to set System Clock to: ') (command_sub left_token: (Token id:Id.Left_Backtick val:'`' span_id:497) command_list: (command.CommandList children: [(C {(date)} {($ Id.VSub_DollarName '$UTC')})] ) ) ) } ) ] ) ] spids: [371 387] ) ] else_action: [(C {(verbose_log_action_msg)} {(DQ ('Not setting System Clock'))})] ) ] spids: [267 268 523 -1] ) (case_arm pat_list: [{(stop)} {(restart)} {(reload)} {(force-reload)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$HWCLOCKACCESS'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:579) ) ] action: [ (C {(log_action_msg)} {(DQ ('Saving the system clock'))}) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(/sbin/hwclock)} {(--rtc) (Id.Lit_Equals '=') (/dev/) ($ Id.VSub_DollarName '$HCTOSYS_DEVICE') } {(--systohc)} {($ Id.VSub_DollarName '$HWCLOCKPARS')} {($ Id.VSub_DollarName '$BADYEAR')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:605) ) ] action: [ (C {(verbose_log_action_msg)} { (DQ ('Hardware Clock updated to ') (command_sub left_token: (Token id: Id.Left_Backtick val: '`' span_id: 614 ) command_list: (command.CommandList children: [(C {(date)})] ) ) ) } ) ] spids: [591 607] ) ] ) ] spids: [565 581] ) ] else_action: [(C {(verbose_log_action_msg)} {(DQ ('Not saving System Clock'))})] ) ] spids: [526 533 638 -1] ) (case_arm pat_list: [{(show)}] action: [ (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(Id.Lit_LBracket '[')} {(DQ ($ Id.VSub_DollarName '$HWCLOCKACCESS'))} {(Id.KW_Bang '!') (Id.Lit_Equals '=')} {(no)} {(Id.Lit_RBracket ']')} ) terminator: (Token id:Id.Op_Semi val:';' span_id:659) ) ] action: [ (C {(/sbin/hwclock)} {(--rtc) (Id.Lit_Equals '=') (/dev/) ($ Id.VSub_DollarName '$HCTOSYS_DEVICE') } {(--show)} {($ Id.VSub_DollarName '$HWCLOCKPARS')} {($ Id.VSub_DollarName '$BADYEAR')} ) ] spids: [645 661] ) ] ) ] spids: [641 642 681 -1] ) (case_arm pat_list: [{(Id.Lit_Star '*')}] action: [ (C {(log_success_msg)} {(DQ ('Usage: hwclock.sh {start|stop|reload|force-reload|show}'))} ) (C {(log_success_msg)} {(DQ (' start sets kernel (system) clock from hardware (RTC) clock'))} ) (C {(log_success_msg)} { (DQ ( ' stop and reload set hardware (RTC) clock from kernel (system) clock' ) ) } ) (command.ControlFlow token: (Token id:Id.ControlFlow_Return val:return span_id:709) arg_word: {(1)} ) ] spids: [684 685 714 -1] ) ] ) ] ) ) (C {(hwclocksh)} {(DQ ($ Id.VSub_At '$@'))}) ] )