File: shfix.patch

package info (click to toggle)
ledcontrol 0.5.2-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 796 kB
  • ctags: 259
  • sloc: ansic: 3,264; sh: 848; makefile: 180; perl: 49
file content (41 lines) | stat: -rw-r--r-- 1,103 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
--- scripts/startup.sh.in.orig	2003-03-15 02:56:40.000000000 -0800
+++ scripts/startup.sh.in	2003-03-15 02:56:49.000000000 -0800
@@ -14,7 +14,7 @@
     exit 1
 fi
 
-source @sysconfdir_int@/ledcontrol.conf
+. @sysconfdir_int@/ledcontrol.conf
 
 
 # Source the scripts...
@@ -27,7 +27,7 @@
 	continue;
     fi
     if test -r ${SCRIPT}; then
-	source ${SCRIPT}
+	. ${SCRIPT}
     fi
 done
 
@@ -44,8 +44,8 @@
 ### Find out how many tests are to be done
 # Also tests that SUCCESS_n is defined.
 MAX_TESTS=0;
-while eval 'test -n "$COMMAND_'$[${MAX_TESTS}+1]'"'; do
-    MAX_TESTS=$[${MAX_TESTS}+1]
+while eval 'test -n "$COMMAND_'`expr $MAX_TESTS + 1`'"'; do
+    MAX_TESTS=`expr $MAX_TESTS + 1`
     # Set the next execution time (immediately)
     eval 'TIME_'${MAX_TESTS}'=`date +%s`'
     if eval 'test -z "$SUCCESS_'${MAX_TESTS}'"' ; then
@@ -99,7 +99,8 @@
 		echo "$FAILURE"
 	    fi
 	    # Set the next execution time
-	    eval 'TIME_'$COUNT'=$[`date +%s`+0$DELAY_'$COUNT']'
+	    SEC=`date +%s`
+	    eval 'TIME_'$COUNT'=`expr $SEC + 0$DELAY_'$COUNT'`'
 	fi
     done
     sleep $MINIMUM_DELAY