2

I have been trying to get some settings in /etc/sysctl.conf to take effect upon rebooting. So, I did the following as the root user on this node running Ubuntu 12.04 LTS 64bit

# service procps status
procps stop/waiting
# service procps start
procps stop/waiting

No matter how I tried. The /etc/init/procps is stock as shown below. I have not touched it (not familiar with upstart yet).

# procps - set sysctls from /etc/sysctl.conf
#
# This task sets kernel sysctl variables from /etc/sysctl.conf and
# /etc/sysctl.d

description     "set sysctls from /etc/sysctl.conf"

instance $UPSTART_EVENTS
env UPSTART_EVENTS=

start on virtual-filesystems or static-network-up

task
script
    cat /etc/sysctl.d/*.conf /etc/sysctl.conf | sysctl -e -p -
end script

I would appreciate it very much for any hints about how to start this upstart job.

Up to now, I always have to manually issue /sbin/sysctl -p /etc/sysctl.conf. It gets old really fast...

Thanks,

-- Zack

1 Answer 1

5

The procps service really isn't a long-running daemon. service procps start just invokes the script in /etc/init/procps, which causes all the contents of /etc/sysctl.d/*.conf and /etc/sysctl.conf to be piped to sysctl -e -p -.

So, the act of running service procps start is pretty much the same as what you are manually doing, and should already be applying at boot, assuming your procps upstart job is configured to run.

1
  • Just one correction (typo?): if the script "/etc/init/procps" doesn't work, try to use "/etc/init.d/procps" instead. Nov 20, 2017 at 23:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .