Author: glen
Date: Thu Oct 19 16:15:53 2006
New Revision: 7878

Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
Avoid heredoc, pdksh makes tmpfile then.

Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions      (original)
+++ rc-scripts/trunk/rc.d/init.d/functions      Thu Oct 19 16:15:53 2006
@@ -918,14 +918,15 @@
        _started=$(progress "WORK")
        _fail=$(progress "FAIL" "$CFAIL")
        _died=$(progress "DIED" "$CFAIL")
-       cat <<-EOF 2>/dev/null > "$cachefile"
-       _busy='$_busy';
-       _ok='$_ok';
-       _started='$_started';
-       _fail='$_fail';
-       _died='$_died';
-       _check='$check';
-EOF
+
+       # we don't use heredoc, as ksh attempts to create tempfile then
+       > "$cachefile" || return
+       echo "_busy='$_busy';" >> "$cachefile"
+       echo "_ok='$_ok';" >> "$cachefile"
+       echo "_started='$_started';" >> "$cachefile"
+       echo "_fail='$_fail';" >> "$cachefile"
+       echo "_died='$_died';" >> "$cachefile"
+       echo "_check='$check';" >> "$cachefile"
 }
 
 rc_gettext_init() {
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to