installkernel: Copy /boot/kernel/initrd.img to /boot/kernel.old too.
authorSascha Wildner <saw@online.de>
Mon, 2 May 2011 23:11:36 +0000 (01:11 +0200)
committerSascha Wildner <saw@online.de>
Mon, 2 May 2011 23:11:36 +0000 (01:11 +0200)
Reported-by: Tim Darby <t+dfbsd@timdarby.net>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issue2059>

sys/conf/kern.post.mk

index 95cb32b..b70b016 100644 (file)
@@ -246,6 +246,9 @@ modules-install: kernel-installable
                done;                                           \
        fi
 .  endif
+       if [ -f ${DESTDIR}${DESTKERNDIR}/initrd.img ]; then     \
+               cp -p ${DESTDIR}${DESTKERNDIR}/initrd.img ${DESTDIR}${DESTKERNDIR}.old; \
+       fi
 .endif
 .if exists(${DESTDIR}/${OLDMODULESDIR})
        rm -rf ${DESTDIR}/${OLDMODULESDIR} # remove deprecated