| … | |
… | |
| 26 | fi |
26 | fi |
| 27 | done |
27 | done |
| 28 | |
28 | |
| 29 | # Only update if files have actually changed |
29 | # Only update if files have actually changed |
| 30 | update=1 |
30 | update=1 |
| 31 | ref_file="${svcdir}/depcache" |
|
|
| 32 | |
31 | |
| 33 | if [[ $1 == "-u" ]] ; then |
32 | if [[ $1 == "-u" ]] ; then |
| 34 | update=0 |
33 | update=0 |
| 35 | clock_screw=0 |
34 | clock_screw=0 |
| 36 | mtime_test="${svcdir}/mtime-test.$$" |
35 | mtime_test="${svcdir}/mtime-test.$$" |
| … | |
… | |
| 83 | /bin/gawk \ |
82 | /bin/gawk \ |
| 84 | -f /lib/rcscripts/awk/functions.awk \ |
83 | -f /lib/rcscripts/awk/functions.awk \ |
| 85 | -f /lib/rcscripts/awk/gendepends.awk || \ |
84 | -f /lib/rcscripts/awk/gendepends.awk || \ |
| 86 | retval=1 |
85 | retval=1 |
| 87 | |
86 | |
| 88 | touch -r "${ref_file}" "${svcdir}"/dep{cache,tree} |
87 | touch "${svcdir}"/dep{cache,tree} |
| 89 | chmod 0644 "${svcdir}"/dep{cache,tree} |
88 | chmod 0644 "${svcdir}"/dep{cache,tree} |
| 90 | |
89 | |
| 91 | eend ${retval} "Failed to cache service dependencies" |
90 | eend ${retval} "Failed to cache service dependencies" |
| 92 | |
91 | |
| 93 | exit ${retval} |
92 | exit ${retval} |