| 114 | |
| 115 | == Proper handling for a port's config files == #configfiles |
| 116 | Many ports install config files (usually in ${prefix}/etc) which the user is expected to edit as needed, after the port is installed. Until ticket #2365 is implemented, proper handling of these config files must be done for each port. If you simply install the config file as part of the port itself, it will then be deleted on uninstall, as well as overwritten on upgrade. These outcomes are bad since it loses what the user updated. |
| 117 | |
| 118 | The current solution is to rename any config files to append a ''.dist'' or ''.sample'' extension to them so that the proper name of the config file is not part of the port. Then, in a post-activate phase, the port can test for the file's existence and, if it doesn't exist yet, copy it (copied in post-activate directly in ${prefix} keeps the file from being recorded as part of the port). |
| 119 | |
| 120 | The [browser:trunk/dports/net/squid/Portfile squid Portfile] and [browser:trunk/dports/security/stegdetect/Portfile stegdetect Portfile] are good examples. |