Use new backup feature of install(1).

This commit is contained in:
Ruslan Ermilov 2001-05-28 16:58:35 +00:00
parent 3f628ce112
commit 4cf39050cc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77348
2 changed files with 2 additions and 21 deletions

View File

@ -7,7 +7,7 @@ SRCS= rtld_start.S rtld.c lockdflt.c map_object.c malloc.c \
MAN= rtld.1
CFLAGS+= -Wall -DFREEBSD_ELF -I${.CURDIR}/${MACHINE_ARCH} -I${.CURDIR}
LDFLAGS+= -nostdlib -e .rtld_start
INSTALLFLAGS+= -fschg -C
INSTALLFLAGS= -fschg -C -b
MLINKS= rtld.1 ld-elf.so.1.1
.if exists(${.CURDIR}/${MACHINE_ARCH}/Makefile.inc)
@ -42,16 +42,3 @@ dyn_hack.so:
.PATH: ${.CURDIR}/${MACHINE_ARCH}
.include <bsd.prog.mk>
# Keep the previous version of the dynamic linker for recovery
# purposes. This must come after the include of <bsd.prog.mk> so that
# BINDIR is set for the exists(...) constructs.
beforeinstall:
.if exists(${DESTDIR}${BINDIR}/${PROG})
-chflags noschg ${DESTDIR}${BINDIR}/${PROG}
.if exists(${DESTDIR}${BINDIR}/${PROG}.old)
-chflags noschg ${DESTDIR}${BINDIR}/${PROG}.old
.endif
${INSTALL} -C -p ${DESTDIR}${BINDIR}/${PROG} \
${DESTDIR}${BINDIR}/${PROG}.old
.endif

View File

@ -5,15 +5,9 @@ PROG= init
MAN= init.8
MLINKS= init.8 securelevel.8
BINMODE=500
INSTALLFLAGS=-fschg
INSTALLFLAGS=-fschg -b -B.bak
CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT
DPADD= ${LIBUTIL} ${LIBCRYPT}
LDADD= -lutil -lcrypt
beforeinstall:
.if exists(${DESTDIR}${BINDIR}/${PROG})
-chflags noschg ${DESTDIR}${BINDIR}/${PROG}
mv ${DESTDIR}${BINDIR}/${PROG} ${DESTDIR}${BINDIR}/${PROG}.bak
.endif
.include <bsd.prog.mk>