]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
Avoid heredoc, pdksh makes tmpfile then.
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 19 Oct 2006 14:15:53 +0000 (14:15 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Thu, 19 Oct 2006 14:15:53 +0000 (14:15 +0000)
svn-id: @7878

rc.d/init.d/functions

index b5d08d07c140e7273f3c9a330b43ce659418d381..197450ae6c35b73b19f7ec2226f1326e2a2f747f 100644 (file)
@@ -918,14 +918,15 @@ rc_cache_init() {
        _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() {
This page took 0.054438 seconds and 4 git commands to generate.