HEADS UP! RCNG in the tree...
Robert Garrett
rg70 at sbcglobal.net
Fri Jul 25 04:25:45 PDT 2003
Please try the following patch, basically this uses the same
find_mode() routine as the 4.8 mergemaster did.
rather than expect the output of the new stat
Rob
===================================================================
RCS file: /usr/home/dcvs/src/usr.sbin/mergemaster/mergemaster.sh,v
retrieving revision 1.3
diff -u -r1.3 mergemaster.sh
--- mergemaster/mergemaster.sh 24 Jul 2003 06:35:39 -0000 1.3
+++ mergemaster/mergemaster.sh 25 Jul 2003 11:14:36 -0000
@@ -670,10 +670,9 @@
# 4095 = "obase=10;ibase=8;07777" | bc
find_mode () {
- local OCTAL
- OCTAL=$(( ~$(echo "obase=10; ibase=8; ${CONFIRMED_UMASK}" | bc) & 4095 &
- $(echo "obase=10; ibase=8; $(stat -f "%OMp%OLp" ${1})" | bc) ))
- printf "%04o\n" ${OCTAL}
+ OCTAL=`perl -e 'printf "%04o\n", (((stat("$ARGV[0]"))[2] & 07777) &~ \
+ oct("$ARGV[1]"))' "${1}" "${CONFIRMED_UMASK}"`
+ echo "${OCTAL}"
}
More information about the Kernel
mailing list