summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2013-09-11 09:43:23 +0200
committerMichał Górny <mgorny@gentoo.org>2013-09-11 09:43:23 +0200
commit2d8eaa9f2c7b32b40152a47728fa87b71948288f (patch)
tree8173d0974cfa7f239afa225fe833618d7572ec91
parentFix issue with non-existing files in local-generator. (diff)
downloadgentoo-systemd-integration-2d8eaa9f2c7b32b40152a47728fa87b71948288f.tar.gz
gentoo-systemd-integration-2d8eaa9f2c7b32b40152a47728fa87b71948288f.tar.bz2
gentoo-systemd-integration-2d8eaa9f2c7b32b40152a47728fa87b71948288f.zip
Use 'echo' instead of 'cat <<_EOF_'. Thanks to pacho and grawity.
<<_EOF_ syntax seems to require temporary file creation that fails during the early boot.
-rwxr-xr-xsystem-generators/gentoo-local-generator6
1 files changed, 2 insertions, 4 deletions
diff --git a/system-generators/gentoo-local-generator b/system-generators/gentoo-local-generator
index a6b3f5f..3a344c8 100755
--- a/system-generators/gentoo-local-generator
+++ b/system-generators/gentoo-local-generator
@@ -41,8 +41,7 @@ for f in *.start *.stop; do
svc_file=gentoo-local-${fn}.service
- cat > "${svc_dir}/${svc_file}" <<_EOF_
-[Unit]
+ echo "[Unit]
Description=Service for local.d/${fn}.*
After=multi-user.target graphical.target ${previous}
ConditionFileIsExecutable=${locald_dir}/${f}
@@ -52,8 +51,7 @@ Type=forking
RemainAfterExit=on
TimeoutSec=0
ExecStart=${start_cmd}
-ExecStop=${stop_cmd}
-_EOF_
+ExecStop=${stop_cmd}" > "${svc_dir}/${svc_file}"
ln -s "../${svc_file}" "${wan_dir}/${svc_file}"