]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
(run_cmd, daemon): set HOME and TMPDIR in nicer way (backport from totalnew)
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 22 Oct 2000 20:55:23 +0000 (20:55 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 22 Oct 2000 20:55:23 +0000 (20:55 +0000)
svn-id: @808

rc.d/init.d/functions

index 074498d280d805997a2c413c957cc128c6c16384..0bdc7cf3e105aacce026169e878858c0c7926aa6 100644 (file)
@@ -1,7 +1,7 @@
 # functions    This file contains functions to be used by most or all
 #              shell scripts in the /etc/init.d directory.
 #
-# $Id: functions,v 1.58 2000/10/22 19:30:18 mkochano Exp $
+# $Id: functions,v 1.59 2000/10/22 20:55:23 misiek Exp $
 #
 # Author:      Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 # Hacked by:    Greg Galloway and Marc Ewing
 # First set up a default search path.
 export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
 
-# Make environment saner.
-unset HOME
-TMPDIR=/tmp
-TEMP=/tmp
-
 # Set defaults
 INIT_COL=67
 
@@ -195,7 +190,7 @@ run_cmd()
        MESSAGE=$1
        show "$MESSAGE"; busy
        shift
-       if _ERRORS="`initlog -c \"$*\" 2>&1`"; then
+       if _ERRORS="`HOME=/tmp TMPDIR=/tmp initlog -c \"$*\" 2>&1`"; then
                ok
        else
                fail;  [ -n "$_ERRORS" ] && echo $_ERRORS
@@ -234,7 +229,7 @@ daemon()
 
        # And start it up.
        busy
-       if _ERRORS="`nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} initlog -c "$*" 2>&1`"; then
+       if _ERRORS="`HOME=/tmp TMPDIR=/tmp nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} initlog -c "$*" 2>&1`"; then
                ok
        else
                exit_code=1
This page took 0.047525 seconds and 4 git commands to generate.