summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-08-01 18:38:38 +0200
committerMichał Górny <mgorny@gentoo.org>2013-08-01 18:38:38 +0200
commit9b358c435a3d42351ac2706223bcac0df9945034 (patch)
treec359770255be32f87c5f9d835ef9f0f52199cf83
parentSwitch local.d support to a generator. (diff)
downloadgentoo-systemd-integration-9b358c435a3d42351ac2706223bcac0df9945034.tar.gz
gentoo-systemd-integration-9b358c435a3d42351ac2706223bcac0df9945034.tar.bz2
gentoo-systemd-integration-9b358c435a3d42351ac2706223bcac0df9945034.zip
Add a design note on using 'env'.
-rwxr-xr-xsystem-generators/gentoo-local-generator5
1 files changed, 5 insertions, 0 deletions
diff --git a/system-generators/gentoo-local-generator b/system-generators/gentoo-local-generator
index c232d46..42889dc 100755
--- a/system-generators/gentoo-local-generator
+++ b/system-generators/gentoo-local-generator
@@ -14,6 +14,11 @@ for f in *.start *.stop; do
*.start)
is_start=1
fn=${f%.start}
+
+ # 'env' guarantees shell-like behavior when starting files.
+ # Especially that text files without shebangs will be
+ # executed via shell.
+
start_cmd="/usr/bin/env ${locald_dir}/${f}"
stop_cmd=/bin/true
if [ -f "${fn}".stop ]; then