diff --git a/sys/conf/Makefile.alpha b/sys/conf/Makefile.alpha index 0d6afd18cc44..3d14ccf164cb 100644 --- a/sys/conf/Makefile.alpha +++ b/sys/conf/Makefile.alpha @@ -292,6 +292,7 @@ kernel-install kernel-install.debug: fi .if exists(${DESTDIR}${KODIR}) .if exists(${DESTDIR}${KODIR}.old) + @-chflags -R noschg ${DESTDIR}${KODIR}.old -rm -rf ${DESTDIR}${KODIR}.old .endif mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old @@ -301,6 +302,7 @@ kernel-install kernel-install.debug: ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}${KODIR} kernel-reinstall kernel-reinstall.debug: + @-chflags -R noschg ${DESTDIR}${KODIR} install -c -m 555 -o root -g wheel \ ${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}${KODIR} diff --git a/sys/conf/Makefile.i386 b/sys/conf/Makefile.i386 index 1d5e1dce0683..b329c11a3f22 100644 --- a/sys/conf/Makefile.i386 +++ b/sys/conf/Makefile.i386 @@ -252,6 +252,7 @@ kernel-install kernel-install.debug: fi .if exists(${DESTDIR}${KODIR}) .if exists(${DESTDIR}${KODIR}.old) + @-chflags -R noschg ${DESTDIR}${KODIR}.old -rm -rf ${DESTDIR}${KODIR}.old .endif mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old @@ -261,6 +262,7 @@ kernel-install kernel-install.debug: ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}${KODIR} kernel-reinstall kernel-reinstall.debug: + @-chflags -R noschg ${DESTDIR}${KODIR} install -c -m 555 -o root -g wheel \ ${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}${KODIR} diff --git a/sys/conf/Makefile.ia64 b/sys/conf/Makefile.ia64 index a589b0034e00..cfa9f74fd759 100644 --- a/sys/conf/Makefile.ia64 +++ b/sys/conf/Makefile.ia64 @@ -256,6 +256,7 @@ kernel-install kernel-install.debug: fi .if exists(${DESTDIR}${KODIR}) .if exists(${DESTDIR}${KODIR}.old) + @-chflags -R noschg ${DESTDIR}${KODIR}.old -rm -rf ${DESTDIR}${KODIR}.old .endif mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old @@ -265,6 +266,7 @@ kernel-install kernel-install.debug: ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}${KODIR} kernel-reinstall kernel-reinstall.debug: + @-chflags -R noschg ${DESTDIR}${KODIR} install -c -m 555 -o root -g wheel \ ${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}${KODIR} diff --git a/sys/conf/Makefile.pc98 b/sys/conf/Makefile.pc98 index bce1d593be03..6bac3f4956e7 100644 --- a/sys/conf/Makefile.pc98 +++ b/sys/conf/Makefile.pc98 @@ -255,6 +255,7 @@ kernel-install kernel-install.debug: fi .if exists(${DESTDIR}${KODIR}) .if exists(${DESTDIR}${KODIR}.old) + @-chflags -R noschg ${DESTDIR}${KODIR}.old -rm -rf ${DESTDIR}${KODIR}.old .endif mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old @@ -264,6 +265,7 @@ kernel-install kernel-install.debug: ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}${KODIR} kernel-reinstall kernel-reinstall.debug: + @-chflags -R noschg ${DESTDIR}${KODIR} install -c -m 555 -o root -g wheel \ ${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}${KODIR} diff --git a/sys/conf/Makefile.powerpc b/sys/conf/Makefile.powerpc index 1d5e1dce0683..b329c11a3f22 100644 --- a/sys/conf/Makefile.powerpc +++ b/sys/conf/Makefile.powerpc @@ -252,6 +252,7 @@ kernel-install kernel-install.debug: fi .if exists(${DESTDIR}${KODIR}) .if exists(${DESTDIR}${KODIR}.old) + @-chflags -R noschg ${DESTDIR}${KODIR}.old -rm -rf ${DESTDIR}${KODIR}.old .endif mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old @@ -261,6 +262,7 @@ kernel-install kernel-install.debug: ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}${KODIR} kernel-reinstall kernel-reinstall.debug: + @-chflags -R noschg ${DESTDIR}${KODIR} install -c -m 555 -o root -g wheel \ ${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}${KODIR}