DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Since Debian 8 and systemd there is no more inittab so how would i do this with systemd to get /var/log/syslog to tty10 ?
- create an /etc/systemd/system/logtail.service file with what you want and enable that service,
- do an 'exec' a the end of /etc/rc.d/rc.local and enable the service,
- use an "@reboot" /etc/crontab line.
Quote:
Originally Posted by tiuz
I know there is a setting in /etc/rsyslog.conf but i would prefer it like described above.
Hmm, time to get more familiar with systemd, also i feel itīs a 100 arms kraken :-)
What i donīt get (fully) is why to bother with rc.local and cron wouldnīt one service file which creates tty10 and print the log to it be enough?
Some time ago a serial console was used to print messages to it and with the setting in rsyslogd.conf this didnīt work very reliable, and as a quick "workaround" i used the line in /etc/inittab for that one.
That's just perception. Think Rene Magritte ;-p Systemd is just a tool.
Yep, :-) a tool with 100 arms :-) (And around 900 configs and files that belonging to it)...
LOL no, I gave you three options. As in OR, not AND-ed.
Hmm, having on line in /etc/inittab with SYS-V init against having to do three things with systemd to get the same result...
Doesnīt look like an improvement to me...
Iīll play around with that when i have more time to look into it as currently i not only have the time but also donīt want to play around with systemd.
Not reliable in what way?
Having this activated in rsyslogd.conf sometimes just didnīt work, got some error logs (canīt remember what they where since itīs been a few years now) It was a bit like "coin tossing" - most times after reboot it worked some times it didnīt. While the inittab-way always worked.
Well, maybe iīll give it a try again in a fresh install.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.