X Tutup
Skip to content

Commit 0ce8860

Browse files
committed
docs: install README files into /var/log and 7etc/rc.d/init.d
On systemd systems seasoned admins might be surprised to see that the init scripts and log files are gone. To ease the transition let's place some README files there, that hopefully help clearing up the situation.
1 parent c846716 commit 0ce8860

File tree

8 files changed

+82
-0
lines changed

8 files changed

+82
-0
lines changed

Makefile.am

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ pkgconfiglibdir=$(libdir)/pkgconfig
6161
polkitpolicydir=$(datadir)/polkit-1/actions
6262
bashcompletiondir=$(sysconfdir)/bash_completion.d
6363
rpmmacrosdir=$(sysconfdir)/rpm
64+
sysvinitdir=$(SYSTEM_SYSVINIT_PATH)
65+
varlogdir=$(localstatedir)/log
6466

6567
# Our own, non-special dirs
6668
pkgsysconfdir=$(sysconfdir)/systemd
@@ -3594,6 +3596,8 @@ SED_PROCESS = \
35943596
-e 's,@sushell\@,$(sushell),g' \
35953597
-e 's,@QUOTAON\@,$(QUOTAON),g' \
35963598
-e 's,@QUOTACHECK\@,$(QUOTACHECK),g' \
3599+
-e 's,@SYSTEM_SYSVINIT_PATH\@,$(sysvinitdir),g' \
3600+
-e 's,@VARLOGDIR\@,$(varlogdir),g' \
35973601
< $< > $@
35983602

35993603
units/%: units/%.in Makefile
@@ -3704,6 +3708,26 @@ DBUS_PREPROCESS = $(CPP) -P $(CFLAGS) $(DBUS_CFLAGS) -imacros dbus/dbus-protocol
37043708
CLEANFILES += \
37053709
$(dbusinterface_DATA)
37063710

3711+
if HAVE_SYSV_COMPAT
3712+
sysvinit_DATA = \
3713+
docs/sysvinit/README
3714+
3715+
varlog_DATA = \
3716+
docs/var-log/README
3717+
3718+
docs/sysvinit/README: docs/sysvinit/README.in
3719+
$(SED_PROCESS)
3720+
3721+
docs/var-log/README: docs/var-log/README.in
3722+
$(SED_PROCESS)
3723+
3724+
EXTRA_DIST += \
3725+
docs/sysvinit/README.in \
3726+
docs/var-log/README.in
3727+
3728+
endif
3729+
3730+
37073731
systemd-install-data-hook:
37083732
$(MKDIR_P) -m 0755 \
37093733
$(DESTDIR)$(tmpfilesdir) \

docs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../src/Makefile

docs/sysvinit/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/README

docs/sysvinit/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../src/Makefile

docs/sysvinit/README.in

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
You are looking for the traditional init scripts in @SYSTEM_SYSVINIT_PATH@,
2+
and they are gone?
3+
4+
Here's an explanation on what's going on:
5+
6+
You are running a systemd-based OS where traditional init scripts have
7+
been replaced by native systemd services files. Service files provide
8+
very similar functionality to init scripts. To make use of service
9+
files simply invoke "systemctl", which will output a list of all
10+
currently running services (and other units). Use "systemctl
11+
list-unit-files" to get a listing of all known unit files, including
12+
stopped, disabled and masked ones. Use "systemctl start
13+
foobar.service" and "systemctl stop foobar.service" to start or stop a
14+
service, respectively. For further details, please refer to
15+
systemctl(1).
16+
17+
Note that traditional init scripts continue to function on a systemd
18+
system. An init script @SYSTEM_SYSVINIT_PATH@/foobar is implicitly mapped
19+
into a service unit foobar.service during system initialization.
20+
21+
Thank you!
22+
23+
Further reading:
24+
man:systemctl(1)
25+
man:systemd(1)
26+
http://0pointer.de/blog/projects/systemd-for-admins-3.html
27+
http://www.freedesktop.org/wiki/Software/systemd/Incompatibilities

docs/var-log/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/README

docs/var-log/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../src/Makefile

docs/var-log/README.in

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
You are looking for the traditional text log files in @VARLOGDIR@, and
2+
they are gone?
3+
4+
Here's an explanation on what's going on:
5+
6+
You are running a systemd-based OS where traditional syslog has been
7+
replaced with the Journal. The journal stores the same (and more)
8+
information as classic syslog. To make use of the journal and access
9+
the collected log data simply invoke "journalctl", which will output
10+
the logs in the identical text-based format the syslog files in
11+
@VARLOGDIR@ used to be. For further details, please refer to
12+
journalctl(1).
13+
14+
Alternatively, consider installing one of the traditional syslog
15+
implementations available for your distribution, which will generate
16+
the classic log files for you. Syslog implementations such as
17+
syslog-ng or rsyslog may be installed side-by-side with the journal
18+
and will continue to function the way they always did.
19+
20+
Thank you!
21+
22+
Further reading:
23+
man:journalctl(1)
24+
man:systemd-journald.service(8)
25+
man:journald.conf(5)
26+
http://0pointer.de/blog/projects/the-journal.html

0 commit comments

Comments
 (0)
X Tutup