DOSC TWiki snapshot as of mid-2005



This is my attempt at writing the sidecar starter script the Redhat Way, as I understand it. It prints the cute green and red [ OK ] and [ FAILED ] things.

The file should be attached to this topic. Install it in /etc/rc.d/init.d and name it sidecar. (I believe it is necessary to call it sidecar and not sidecard due to the name of sidecar's .pid file.) Place symlinks to it in /etc/rc.d/rcX.d called S98sidecar (that number isn't really special) where X is all runlevels you wish to make run sidecar. Symlink K98sidecar to it in runlevels which should not run sidecar. This looks like

cp sidecard2 /etc/rc.d/init.d/sidecar
chmod +x /etc/rc.d/init.d/sidecar
ln -s /etc/rc.d/init.d/sidecar /etc/rc.d/rc1.d/K98sidecar
ln -s /etc/rc.d/init.d/sidecar /etc/rc.d/rc2.d/S98sidecar
ln -s /etc/rc.d/init.d/sidecar /etc/rc.d/rc3.d/S98sidecar
ln -s /etc/rc.d/init.d/sidecar /etc/rc.d/rc4.d/S98sidecar
ln -s /etc/rc.d/init.d/sidecar /etc/rc.d/rc5.d/S98sidecar
ln -s /etc/rc.d/init.d/sidecar /etc/rc.d/rc6.d/K98sidecar
I don't know if there is some gui gadget that would do this for you or not. I also don't know if this is at all applicable to other distros. It's not even close on OpenBSD :) I would very much appreciate it if another pair of eyes or two would confirm that I haven't written something idiotic in that file, as it is meant to run as root!

I've generated a LinuxSidecarSystracePolicy. Unfortunately, my linux systrace does not seem to allow privilege elevation, so sidecar must still run as root, but at least this restricts it pretty well. You must use a different sidecard script to start sidecar with systrace; SystraceSidecard2.

AlexFerguson - 18 Mar 2003