On 2/1/06, Rob Riggs <rob@xxxxxxxxxxxxxxx> wrote: > Joe Van Dyk wrote: > > >Say I want to add the following lines to /etc/sysctl.conf and do it via a RPM: > > > >kernel.shmmax = 200000000 > >kernel.shmall = 20000000 > > > >Would my RPM just contain a patch? Or would I not want to do this > >kind of thing through an RPM? > > > >Our software requires a bunch of changes to a linux box in order to > >run (modified kernel, the above change, a new compiler, etc). RPMs > >are a sane way of pushing out the changes to the machines, right? > > > > > Create a file called /etc/opt/joe_van_dyk/sysctl.conf (silly example; > use whatever is appropriate) and have an init script (e.g. > /etc/init.d/joe_van_dyk) which runs "sysctl -p > /etc/opt/joe_van_dyk/sysctl.conf" on startup. > > I typically put all of my config files in /etc/opt/{company}or > /etc/opt/{package} for the software I build at work. > > In the RPM, you just need a post-install script to add the service, and > a pre-uninstall script to remove it (using /sbin/chkconfig). You may > wish to even apply the settings immediately after package installation > by adding a call to "/sbin/service joe_van_dyk start" in the > post-install script. Otherwise you will need to start the service > manually. (This may not be necessary for you, since you have to boot > the modified kernel anyway.) > > With this mechanism, everything installs and uninstalls cleanly. Hm.. thanks for the idea. sysctl accepts a -w option that can change stuff right from the command-line, without having to load in an entire config file. Are there any guides or tutorials out there for how to correctly add init scripts and services to a redhat box? _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/rpm-list