#
# rc.local
#
PATH=/local/gnu/bin:/bin:/usr/bin:/usr/sbin; export PATH
#!/bin/sh
if [ "`hostname`" = "net-server" ]; then
echo Starting WWW server
/local/httpd_1.4/httpd -d /local/httpd_1.4
echo Starting GNU finger server
/local/etc/fingerd
fi
echo Starting ypbind
/usr/lib/netsvc/yp/ypbind
echo Adding a default route and flushing table
route -f add default my-gateway 1
echo Starting xdm
/local/bin/start-xdm
Now add an entry to your cfengine.conf file like this
solaris::
{ /etc/rc3.d/S99rc-local
AutoCreate
AppendIfNoSuchLine "exec sh /local/etc/rc.local"
}
files:
/tmp mode=1777 action=fixdirs
editfiles:
{ /etc/shells
AppendIfNoSuchLine "/local/bin/tcsh"
}
tcsh prints an error message on startup and will not read my
.cshrc file.
disable:
/etc/.login type=file
You might want to replace this with a link to your own file.
files:
solaris::
/etc/defaultrouter o=root g=other m=644 act=touch
editfiles:
solaris::
{ /etc/defaultrouter
AppendIfNoSuchLine "xxx.xxx.xxx.1"
}
where xxx.xxx.xxx.1 is the IP address of your gateway.
files:
/etc/system o=root g=root m=0644 action=touch
$(root)/filename
and set $(root) to "" or "/a" depending on context?
That way you could the above without screwing up other things which
might be needed. You can switch off the locks with -K. And you
could override the vfstab location for solaris in the resource file.