Date: Sat, 16 Nov 1996 13:16:14 +0100 (MET) From: "Ph. Charnier" <charnier@xp11.frmug.org> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/2040: make world fails after cp -pR of /usr/bin Message-ID: <199611161216.NAA01501@xp11.frmug.org> Resent-Message-ID: <199611162300.PAA26202@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 2040
>Category: bin
>Synopsis: make world fails after cp -pR of /usr/bin
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Nov 16 15:00:05 PST 1996
>Last-Modified:
>Originator: Ph. Charnier
>Organization:
>Release: FreeBSD 3.0-CURRENT i386
>Environment:
>Description:
cp -pR breaks hard links, (chpass, chfn, chsh, ypchpass, ypchfn and
ypchsh become 6 differents programs). Make install will fail later because it
assumes that only chpass has immutable flag.
I got: rm: /usr/bin/yppasswd: Operation not permitted.
>How-To-Repeat:
notice that the defect list of your hard disk is quickly growing
and after a lot of bad144 actions, decide to put /usr on another disk. Run a
dump to save your datas, but too late! Run cp -pR ... :-)
>Fix:
the enclosed patches can recover from such a situation
Index: Makefile
===================================================================
RCS file: /home2h/FreeBSD.cvsroot/src/usr.bin/chpass/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile 1996/08/12 14:45:21 1.9
+++ Makefile 1996/11/16 11:50:54
@@ -52,8 +52,10 @@
${RPCGEN} -c -o ${.TARGET} ${RPCSRC_PRIV}
beforeinstall:
- [ ! -e ${DESTDIR}${BINDIR}/chpass ] || \
- chflags noschg ${DESTDIR}${BINDIR}/chpass
+.for i in chpass chfn chsh ypchpass ypchfn ypchsh
+ [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
+ chflags noschg ${DESTDIR}${BINDIR}/$i
+.endfor
afterinstall:
chflags schg ${DESTDIR}${BINDIR}/chpass
Index: Makefile
===================================================================
RCS file: /home2h/FreeBSD.cvsroot/src/usr.bin/passwd/Makefile,v
retrieving revision 1.20
diff -u -r1.20 Makefile
--- Makefile 1996/11/03 03:11:54 1.20
+++ Makefile 1996/11/16 11:56:04
@@ -65,8 +65,10 @@
.endif
beforeinstall:
- [ ! -e ${DESTDIR}${BINDIR}/passwd ] || \
- chflags noschg ${DESTDIR}${BINDIR}/passwd
+.for i in passwd yppasswd
+ [ ! -e ${DESTDIR}${BINDIR}/$i ] || \
+ chflags noschg ${DESTDIR}${BINDIR}/$i
+.endfor
afterinstall:
chflags schg ${DESTDIR}${BINDIR}/passwd
>Audit-Trail:
>Unformatted:
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611161216.NAA01501>
