07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DEBIAN POLICY<br />

Preserving changes<br />

The Debian Policy expressly stipulates that everything should be done to preserve<br />

manual changes made to a configuration file, so more and more scripts<br />

take precautions when editing configuration files. The general principle is<br />

simple: the script will only make changes if it knows the status of the configuration<br />

file, which is verified by comparing the checksum of the file against<br />

that of the last automatically generated file. If they are the same, the script<br />

is authorized to change the configuration file. Otherwise, it determines that<br />

the file has been changed and asks what action it should take (install the new<br />

file, save the old file, or try to integrate the new changes with the existing<br />

file). This precautionary principle has long been unique to Debian, but other<br />

distributions have gradually begun to embrace it.<br />

The ucf program (from the Debian package of the same name) can be used to<br />

implement such a behavior.<br />

9.5. syslog System Events<br />

9.5.1. Principle and Mechanism<br />

The rsyslogd daemon is responsible for collecting service messages coming from applications<br />

and the kernel, then distributing them into log files (usually stored in the /var/log/ directory).<br />

It obeys the /etc/rsyslog.conf configuration file.<br />

SUPPLEMENTS<br />

Moving from sysklogd to<br />

rsyslog<br />

Debian Squeeze installs rsyslog by default, while older versions (up to Etch, but<br />

not Lenny) used sysklogd. The transition was not automatic, and in the case<br />

of an upgrade from Etch, rsyslog should be installed manually if you want to<br />

keep in sync with Debian's default choice.<br />

Migration from one to the other is painless, since the default configuration is<br />

very similar, and the syntax of the older /etc/syslog.conf is compatible with<br />

the new /etc/rsyslog.conf.<br />

Each log message is associated with an application subsystem (called “facility” in the documentation):<br />

• auth and authpriv: for authentication;<br />

• cron: comes from task scheduling services, cron and atd;<br />

• daemon: affects a daemon without any special classification (DNS, NTP, etc.);<br />

• p: concerns the FTP server;<br />

• kern: message coming from the kernel;<br />

• lpr: comes from the printing subsystem;<br />

• mail: comes from the e-mail subsystem;<br />

200 The Debian Administrator's Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!