Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 188808
Collapse All | Expand All

(-)sysstat.in.org (-6 / +5 lines)
Lines 10-31 Link Here
10
10
11
RETVAL=0
11
RETVAL=0
12
SYSCONFIG_DIR=@SYSCONFIG_DIR@
12
SYSCONFIG_DIR=@SYSCONFIG_DIR@
13
# Remove flag indicating that sadc was successfully launched
14
rm -f /tmp/sysstat.run
15
13
16
# See how we were called.
14
# See how we were called.
17
case "$1" in
15
case "$1" in
18
  start)
16
  start)
17
  	exitCodeIndicator="$(mktemp /tmp/sysstat-XXXXXX)" || exit 1
19
        echo -n "Calling the system activity data collector (sadc): "
18
        echo -n "Calling the system activity data collector (sadc): "
20
        @SU_C_OWNER@ @QUOTE@ @SA_LIB_DIR@/sa1 --boot && touch /tmp/sysstat.run @QUOTE@
19
        @SU_C_OWNER@ @QUOTE@ @SA_LIB_DIR@/sa1 --boot || rm -f ${exitCodeIndicator} @QUOTE@
21
20
22
	# Try to guess if sadc was successfully launched. The difficulty
21
	# Try to guess if sadc was successfully launched. The difficulty
23
	# here is that the exit code is lost when the above command is
22
	# here is that the exit code is lost when the above command is
24
	# run via "su foo -c ..."
23
	# run via "su foo -c ..."
25
	if [ ! -f /tmp/sysstat.run ]; then
24
	if [ -f "${exitCodeIndicator}" ]; then
26
		RETVAL=1
25
		rm -f ${exitCodeIndicator}
27
	else
26
	else
28
		rm -f /tmp/sysstat.run
27
		RETVAL=1
29
	fi
28
	fi
30
        echo
29
        echo
31
        ;;
30
        ;;

Return to bug 188808