#! /bin/sh # /etc/init.d/procps: Set kernel variables from /etc/sysctl.conf # # written by Elrond ### BEGIN INIT INFO # Provides: procps # Required-Start: mountkernfs $local_fs # Required-Stop: # Should-Start: udev module-init-tools # X-Start-Before: $network # Default-Start: S # Default-Stop: # Short-Description: Configure kernel parameters at boottime # Description: Loads kernel parameters that are specified in /etc/sysctl.conf ### END INIT INFO global PATH := '/sbin:/bin' global SYSCTL := '/sbin/sysctl' test -x $SYSCTL || exit 0 source /lib/lsb/init-functions # Comment this out for sysctl to print every item changed global QUIET_SYSCTL := '"-q'" # Check for existance of the default file and exit if not there, # Closes #52839 for the boot-floppy people if test -f /etc/default/rcS { source /etc/default/rcS } set -e matchstr $1 { start|restart|force-reload|reload { log_action_begin_msg "Setting kernel variables " global STATUS := '0' $SYSCTL $QUIET_SYSCTL --system || global STATUS := $Status log_action_end_msg $STATUS } stop { } status { } * { echo "Usage: /etc/init.d/procps {start|stop|restart|reload|force-reload|status}" > !2 exit 3 } } exit 0 (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:PATH) op: Equal rhs: {(/sbin) (Lit_Other ":") (/bin)} spids: [47] ) ] spids: [47] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:SYSCTL) op:Equal rhs:{(/sbin/sysctl)} spids:[53])] spids: [53] ) (AndOr children: [(C {(test)} {(-x)} {($ VSub_Name "$SYSCTL")}) (C {(exit)} {(0)})] op_id: Op_DPipe ) (C {(.)} {(/lib/lsb/init-functions)}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:QUIET_SYSCTL) op:Equal rhs:{(DQ (-q))} spids:[78])] spids: [78] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other "[")} {(-f)} {(/etc/default/rcS)} {(Lit_Other "]")}) terminator: ) ] action: [(C {(.)} {(/etc/default/rcS)})] spids: [-1 102] ) ] spids: [-1 109] ) (C {(set)} {(-e)}) (Case to_match: {(DQ ($ VSub_Number "$1"))} arms: [ (case_arm pat_list: [{(start)} {(restart)} {(force-reload)} {(reload)}] action: [ (C {(log_action_begin_msg)} {(DQ ("Setting kernel variables "))}) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:STATUS) op:Equal rhs:{(0)} spids:[143])] spids: [143] ) (AndOr children: [ (C {($ VSub_Name "$SYSCTL")} {($ VSub_Name "$QUIET_SYSCTL")} {(--system)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:STATUS) op: Equal rhs: {($ VSub_QMark "$?")} spids: [155] ) ] spids: [155] ) ] op_id: Op_DPipe ) (C {(log_action_end_msg)} {($ VSub_Name "$STATUS")}) ] spids: [126 133 164 -1] ) (case_arm pat_list:[{(stop)}] spids:[167168171-1]) (case_arm pat_list:[{(status)}] spids:[174175178-1]) (case_arm pat_list: [{(Lit_Other "*")}] action: [ (SimpleCommand words: [ {(echo)} {(DQ ("Usage: /etc/init.d/procps {start|stop|restart|reload|force-reload|status}"))} ] redirects: [(Redir op_id:Redir_GreatAnd fd:-1 arg_word:{(2)} spids:[191])] ) (C {(exit)} {(3)}) ] spids: [181 182 200 -1] ) ] spids: [117 123 202] ) (C {(exit)} {(0)}) ] )