diff options
author | 2015-02-13 07:51:26 +0000 | |
---|---|---|
committer | 2015-02-13 07:51:26 +0000 | |
commit | 0568ea814c233df50b602aad395969a743bb4eac (patch) | |
tree | 509f61dfe69737fed25ee89158846427b8e14f73 | |
parent | 542b7e68020cb1fad12ec921e6c27c75220fa05c (diff) | |
download | pw-darwin-0568ea814c233df50b602aad395969a743bb4eac.tar.gz pw-darwin-0568ea814c233df50b602aad395969a743bb4eac.tar.zst pw-darwin-0568ea814c233df50b602aad395969a743bb4eac.zip |
Partially revert 278642
On reinstall (overwrite) install(1) does not handle chflags
Reported by: ian
-rw-r--r-- | chpass/Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chpass/Makefile b/chpass/Makefile index c0cf46c..9b3e878 100644 --- a/chpass/Makefile +++ b/chpass/Makefile @@ -9,7 +9,6 @@ PROG= chpass SRCS= chpass.c edit.c field.c pw_scan.c table.c util.c BINOWN= root BINMODE=4555 -PRECIOUSPROG= .if ${MK_NIS} != "no" CFLAGS+= -DYP .endif @@ -35,4 +34,16 @@ MLINKS= chpass.1 chfn.1 chpass.1 chsh.1 MLINKS+= chpass.1 ypchpass.1 chpass.1 ypchfn.1 chpass.1 ypchsh.1 .endif +beforeinstall: +.for i in chpass chfn chsh ypchpass ypchfn ypchsh +.if exists(${DESTDIR}${BINDIR}/$i) + -chflags noschg ${DESTDIR}${BINDIR}/$i +.endif +.endfor + +.if !defined(NO_FSCHG) +afterinstall: + -chflags schg ${DESTDIR}${BINDIR}/chpass +.endif + .include <bsd.prog.mk> |