Chapter 8. The `pkg-`*`` Files
Prev |  | Next

## Chapter 8. The `pkg-`*`` Files

There are some tricks we have not mentioned yet about the `pkg-`*`` files that come in handy sometimes.

## 8.1. `pkg-message`

If you need to display a message to the installer, you may place the message in `pkg-message`. This capability is often useful to display additional installation steps to be taken after a pkg_add(1) or to display licensing information.

When some lines about the build-time knobs or warnings have to be displayed, use `ECHO_MSG`. The `pkg-message` file is only for post-installation steps. Likewise, the distinction between `ECHO_MSG` and `ECHO_CMD` should be kept in mind. The former is for printing informational text to the screen, while the latter is for command pipelining:

update-etc-shells: @${ECHO_MSG} "updating /etc/shells" @${CP} /etc/shells /etc/shells.bak @( ${GREP} -v ${PREFIX}/bin/bash /etc/shells.bak; \ ${ECHO_CMD} ${PREFIX}/bin/bash) >/etc/shells @${RM} /etc/shells.bak

### Note:

The `pkg-message` file does not need to be added to `pkg-plist`. Also, it will not get automatically printed if the user is using the port, not the package, so you should probably display it from the `post-install` target yourself.

Prev |  | Next
7.5. Automated Package List Creation | Home | 8.2. `pkg-install`

This, and other documents, can be downloaded from http://ftp.FreeBSD.org/pub/FreeBSD/doc/

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.