[packages] Explain pre-script isn't actually a shell script

This commit is contained in:
Adriaan de Groot 2019-08-26 16:42:05 +02:00
parent 56792fdcb5
commit d063d60e37

View File

@ -87,9 +87,25 @@ update_system: false
# pre-script: touch /tmp/installing-vi # pre-script: touch /tmp/installing-vi
# post-script: rm -f /tmp/installing-vi # post-script: rm -f /tmp/installing-vi
# #
# The pre- and post-scripts are optional, but you cannot leave both out: using # The pre- and post-scripts are optional, but you cannot leave both out
# "package: vi" with neither script option will trick Calamares into # if you do use the *package* key: using "package: vi" with neither script
# trying to install a package named "package: vi", which is unlikely to work. # option will trick Calamares into trying to install a package named
# "package: vi", which is unlikely to work.
#
# The pre- and post-scripts are **not** executed by a shell unless you
# explicitly invoke `/bin/sh` in them. The command-lines are passed
# to exec(), which does not understand shell syntax. In other words:
#
# pre-script: ls | wc -l
#
# Will fail, because `|` is passed as a command-line argument to ls,
# as are `wc`, and `-l`. No shell pipeline is set up, and ls is likely
# to complain. Invoke the shell explicitly:
#
# pre-script: /bin/sh -c \"ls | wc -l\"
#
# The above note on shell-expansion applies to versions up-to-and-including
# Calamares 3.2.12, but will change in future.
# #
# Any package name may be localized; this is used to install localization # Any package name may be localized; this is used to install localization
# packages for software based on the selected system locale. By including # packages for software based on the selected system locale. By including