Add latecommand description

This commit is contained in:
Jeremy Gardais 2016-07-11 16:44:26 +02:00
parent d3971f4b36
commit 94ca13cca6
1 changed files with 41 additions and 0 deletions

View File

@ -5,6 +5,7 @@
* [Download Debian](#download_debian.sh)
* [Download Ubuntu](#dowload_ubuntu.sh)
* [Make Debian Initrd with Firmware](#make_debian_initrd_with_firmware.sh)
* [Late command](#latecommand)
## Description
Set of scripts to download and generate necessary files to allow differents GNU/Linux distributions to boot through the network.
@ -33,3 +34,43 @@ The script will provide Debian's netboot installers with **additionnals firmware
* myricom: For Myricom Myri-10G Ethernet adapters (IBM server).
* qlogic: For QLogic Infiniband, SCSI, Fibre Channel/FCoE adapters.
* Extract initrd and firmwares packages to build a new initrd.
### latecommand
#### Description
Some useful configurations after a Debian installation:
* Smarter rsyslog (more directories and less files in **/var/log**).
* Smarter logrotate (add timestamp, move some old log files to the same directory,…).
* Remove some useless packages.
* …
* /etc/rsyslog.conf
* Shorter configuration file and use more files from /etc/rsyslog.d/
* /etc/rsyslog.d/99syslog.conf
| Logs | Original path | New path |
| ---------- | ------------------- | ---------------------------------- |
| _kern_ | /var/log/kern.log | __/var/log/kernel/kernel.log__ |
| _user_ | /var/log/user.log | __/var/log/security/user.log__ |
| _mail_ | /var/log/mail.… | __/var/log/mail/mail.…__ |
| _daemon_ | /var/log/daemon.log | __/var/log/syslog/daemon.log__ |
| _auth_ | /var/log/auth.log | __/var/log/security/auth.log__ |
| _lpr_ | /var/log/lpr.log | __/var/log/lpr/lpr.log__ |
| _cron_ | /var/log/cron.log | __/var/log/cron/cron.log__ |
| _localX_ | /var/log/localX.log | __/var/log/syslog/localX.log__ |
| _syslog_ | /var/log/syslog.log | __/var/log/syslog/syslog.log__ |
| _authpriv_ | … | __/var/log/security/authpriv.log__ |
#### How-to use it
* First, make an archive of the script and directories:
```
tar czvf finish.tar.gz latecommand/
```
* Then, it can be use at the end of a Debian preseed file:
```
d-i preseed/late_command string in-target chsh -s /bin/zsh ; \
in-target /usr/bin/tftp ${IP.SRV.TFTP} -c get ${PATH/TO/TFTPD/ROOT}/finish.tar.gz /tmp/finish.tar.gz ; \
in-target tar xzf /tmp/finish.tar.gz -C /tmp/ ; \
in-target /bin/sh /tmp/latecommand/post.sh
```