LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   start syslog (https://www.linuxquestions.org/questions/linux-newbie-8/start-syslog-242385/)

jeopardyracing 10-13-2004 09:37 PM

start syslog
 
I'm running a hard drive intall of Knoppix and really liking it. I notice that by default it doesn't look like the system log starts automatically - they have GUI button to start it. I'd like for it to start each time I start the machine. I could put it in my user autostart folder for KDE but the commmand needs root. Where can I put the command elsewhere in the system such that it runs on each boot?

evilmrhenry 10-14-2004 03:14 AM

Quote:

Where can I put the command elsewhere in the system such that it runs on each boot?
That is what the /etc/rc*.d directories are for. I've got the following files on my machine:
/etc/init.d/sysklogd
/etc/rc0.d/K90sysklogd
/etc/rc2.d/S10sysklogd
/etc/rc3.d/S10sysklogd
/etc/rc4.d/S10sysklogd
/etc/rc5.d/S10sysklogd
/etc/rc6.d/K90sysklogd
The rc*.d files are all links to the init.d file. The S or K tell the computer to start or stop the service, and the 90 or 10 gives the priority compared to the other files in the directory.
On Debian based systems, the right way to do this is to apt-get the sysklog package, then make sure the links are created.

The only problem I see is if Knoppix does not allow changing items in the /etc directory. If so, this becomes a lot harder.

foo_bar_foo 10-14-2004 03:32 AM

know nothing about knoppix accept it's debian sortof
i forget debian boot structure exactly so take this as general
put a link to the boot script in you runlevel folder
lets see you find your default run level by reading /etc/inittab
there is a line like this
id:3:initdefault:
that means run level 3
so the link goes in the rc3.d folder
name the link S10sysklogd in other words have it be the lowest number in the folder
S is for Start
and it points to /init.d/sysklogd script -- the script might be called anything
it calles syslogd and klogd (the log daemons) or they might be seperate called from seperate scripts
if i remember right debian uses some cool little executables in /sbin to do some of the bootscript stuff
so if knopix doesn't come with boot scripts get some debian ones from somewhere
red hat like boot scripts won't work
you will also have to make kill links in rc0.d and rc6.d
halt and reboot
i would make those K40sysklogd
the names don't matter ! but the numbers get called in order and just run the script that the link points to
man ln
to read how to make links (ln -s <target> <linkname>)
don't mix up target and linkname or you erase stuff
test the scripts by running them as root by hand before you subject your boot to them !
test the kill as well. just to make sure they work and don't hang or complain
if you write them yourself make sure they are executable (chmod 755)

jeopardyracing 10-14-2004 07:46 PM

Great
 
Thanks! I'll post back with how it went.


All times are GMT -5. The time now is 08:22 PM.