Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Feb 2015 09:02:16 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r278669 - head/usr.bin/passwd
Message-ID:  <201502130902.t1D92Gin046622@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Fri Feb 13 09:02:15 2015
New Revision: 278669
URL: https://svnweb.freebsd.org/changeset/base/278669

Log:
  Revert r278642
  
  install(1) does not handle chflags on hardlinks

Modified:
  head/usr.bin/passwd/Makefile

Modified: head/usr.bin/passwd/Makefile
==============================================================================
--- head/usr.bin/passwd/Makefile	Fri Feb 13 08:42:01 2015	(r278668)
+++ head/usr.bin/passwd/Makefile	Fri Feb 13 09:02:15 2015	(r278669)
@@ -7,10 +7,20 @@ PROG	 = passwd
 BINOWN	 = root
 BINMODE	 = 4555
 LIBADD   = pam
-PRECIOUSPROG=
 .if ${MK_NIS} != "no"
 LINKS	 = ${BINDIR}/passwd ${BINDIR}/yppasswd
 MLINKS	 = passwd.1 yppasswd.1
 .endif
 
+beforeinstall:
+.for i in passwd yppasswd
+	[ ! -e ${DESTDIR}${BINDIR}/$i ] || \
+		chflags noschg ${DESTDIR}${BINDIR}/$i || true
+.endfor
+
+.if !defined(NO_FSCHG)
+afterinstall:
+	-chflags schg ${DESTDIR}${BINDIR}/passwd
+.endif
+
 .include <bsd.prog.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502130902.t1D92Gin046622>