[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: rc.local equivalent



Xeno Campanoli wrote:
Say, is there a catchall equivalent in Debian of the rc.local file? Once again I'm trying to interpret a recommendation from the TrinityOS
HOWTO on setting up security.  He suggests putting:

	dmesg >> /etc/info/dmesg

at the end of the rc.local file, which presumably executes last in a
RedHat system.  Is there a better way to accomplish this anyway.

You can create a file in /etc/init.d and then put the above command inside. There is already a skeleton file in the directory, you can just copy it down.
cp /etc/init.d/sekeleton /etc/init.d/dmesg-backup
(edit the file and put the command in the "start)" block)
update-rc.d dmesg-backup start 99 2 3 4 5 .

Don't forget to edit the DAEMON variable in the startup script (just put "dmesg"). The update-rc.d just means that the dmesg-backup script will be started last (ie: 99) and on 2,3,4,5 init levels.

Oki








Reply to: