Page MenuHomeFreeBSD

D36770.1778397349.diff
No OneTemporary

Size
3 KB
Referenced Files
None
Subscribers
None

D36770.1778397349.diff

Index: documentation/content/en/books/porters-handbook/pkg-files/_index.adoc
===================================================================
--- documentation/content/en/books/porters-handbook/pkg-files/_index.adoc
+++ documentation/content/en/books/porters-handbook/pkg-files/_index.adoc
@@ -230,15 +230,20 @@
`$2` can be tested to determine which mode the script is being run in.
The `PKG_PREFIX` environmental variable will be set to the package installation directory.
-If you use [.filename]#pkg-pre-install# or [.filename]#pkg-post-install# instead, the script is only run once, before or after installation of the package.
-You can also use [.filename]#pkg-pre-install.lua# or [.filename]#pkg-post-install.lua# to run a lua script instead of a shell script.
-Lua scripts run by `pkg` provide some extensions and a few restrictions, for these see man:pkg-lua-script[5].
+If using [.filename]#pkg-pre-install# or [.filename]#pkg-post-install# instead, the script is run only once (before or after installing the package), with the single argument `${PKGNAME}`.
+Using [.filename]#pkg-pre-install.lua# or [.filename]#pkg-post-install.lua# will run a lua script instead of a shell script.
+Lua scripts run by `pkg` provide some extensions and a few restrictions, both explained in man:pkg-lua-script[5].
-These scripts will automatically be added to the package.
+[NOTE]
+====
+Using [.filename]#pkg-pre-install# (or [.filename]#pkg-pre-install.lua#) and [.filename]#pkg-post-install# (or [.filename]#pkg-post-install.lua#) is preferred to using [.filename]#pkg-install#.
+====
+
+These scripts will automatically be added to the packing list.
[IMPORTANT]
====
-These scripts are here to help you set up the package so that it is as ready to use as possible.
+These scripts are here to simplify package configuration after installation.
They _must not_ be abused to start services, stop services, or run any other commands that will modify the currently running system.
====
@@ -252,15 +257,20 @@
`$2` can be tested to determine which mode the script is being run in.
The `PKG_PREFIX` environmental variable will be set to the package installation directory.
-If you use [.filename]#pkg-pre-deinstall# or [.filename]#pkg-post-deinstall# instead, the script is only run once, before or after removal of the package.
-You can also use [.filename]#pkg-pre-deinstall.lua# or [.filename]#pkg-post-deinstall.lua# to run a lua script instead of a shell script.
-Lua scripts run by `pkg` provide some extensions and a few restrictions, for these see man:pkg-lua-script[5].
+If using [.filename]#pkg-pre-deinstall# or [.filename]#pkg-post-deinstall# instead, the script is run only once (before or after deinstalling the package), with the single argument `${PKGNAME}`.
+Using [.filename]#pkg-pre-deinstall.lua# or [.filename]#pkg-post-deinstall.lua# will run a lua script instead of a shell script.
+Lua scripts run by `pkg` provide some extensions and a few restrictions, both explained in man:pkg-lua-script[5].
+
+[NOTE]
+====
+Using [.filename]#pkg-pre-deinstall# (or [.filename]#pkg-pre-deinstall.lua#) and [.filename]#pkg-post-deinstall# (or [.filename]#pkg-post-deinstall.lua#) is preferred to using [.filename]#pkg-deinstall#.
+====
-These scripts will automatically be added to the package.
+These scripts will automatically be added to the packing list.
[IMPORTANT]
====
-These scripts are here to help you set up the package so that it is as ready to use as possible.
+These scripts are here to simplify cleanup after package deinstallation.
They _must not_ be abused to start services, stop services, or run any other commands that will modify the currently running system.
====

File Metadata

Mime Type
text/plain
Expires
Sun, May 10, 7:15 AM (14 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28632777
Default Alt Text
D36770.1778397349.diff (3 KB)

Event Timeline