pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Don't use the -nt operator for ${TEST}. It is not d...
details: https://anonhg.NetBSD.org/pkgsrc/rev/203867a74c88
branches: trunk
changeset: 488914:203867a74c88
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Feb 12 00:27:41 2005 +0000
description:
Don't use the -nt operator for ${TEST}. It is not defined in POSIX, and
not provided by the Solaris 9 /bin/sh. Use the find(1) -newer expression
instead, as it expresses exactly what we want, compared to the "ls -t"
hack.
diffstat:
mk/bsd.pkg.mk | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (27 lines):
diff -r 12a4c4aec859 -r 203867a74c88 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Sat Feb 12 00:12:39 2005 +0000
+++ b/mk/bsd.pkg.mk Sat Feb 12 00:27:41 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1586 2005/02/11 17:00:07 tv Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1587 2005/02/12 00:27:41 rillig Exp $
#
# This file is in the public domain.
#
@@ -1621,10 +1621,13 @@
${FALSE}; \
fi; \
while true; do \
- if ${TEST} -f /var/run/dmesg.boot -a -f ${LOCKFILE} -a \
- /var/run/dmesg.boot -nt ${LOCKFILE}; then \
- ${ECHO} "=> Removing stale ${LOCKFILE}"; \
- ${RM} ${LOCKFILE}; \
+ : "Remove lock files older than the last reboot"; \
+ if ${TEST} -f /var/run/dmesg.boot -a -f ${LOCKFILE}; then \
+ rebooted=`${FIND} /var/run/dmesg.boot -newer ${LOCKFILE}`; \
+ if ${TEST} x"$rebooted" != x; then \
+ ${ECHO} "=> Removing stale ${LOCKFILE}"; \
+ ${RM} ${LOCKFILE}; \
+ fi; \
fi; \
${SHLOCK} -f ${LOCKFILE} -p $$ppid && break; \
${ECHO} "=> Lock is held by pid `cat ${LOCKFILE}`"; \
Home |
Main Index |
Thread Index |
Old Index