| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile.bootimage,v 1.27 2021/06/04 17:09:36 tsutsui Exp $ | | 1 | # $NetBSD: Makefile.bootimage,v 1.28 2021/07/24 13:59:28 jmcneill Exp $ |
2 | # | | 2 | # |
3 | # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui. All rights reserved. | | 3 | # Copyright (c) 2009, 2010, 2011 Izumi Tsutsui. All rights reserved. |
4 | # | | 4 | # |
5 | # Redistribution and use in source and binary forms, with or without | | 5 | # Redistribution and use in source and binary forms, with or without |
6 | # modification, are permitted provided that the following conditions | | 6 | # modification, are permitted provided that the following conditions |
7 | # are met: | | 7 | # are met: |
8 | # 1. Redistributions of source code must retain the above copyright | | 8 | # 1. Redistributions of source code must retain the above copyright |
9 | # notice, this list of conditions and the following disclaimer. | | 9 | # notice, this list of conditions and the following disclaimer. |
10 | # 2. Redistributions in binary form must reproduce the above copyright | | 10 | # 2. Redistributions in binary form must reproduce the above copyright |
11 | # notice, this list of conditions and the following disclaimer in the | | 11 | # notice, this list of conditions and the following disclaimer in the |
12 | # documentation and/or other materials provided with the distribution. | | 12 | # documentation and/or other materials provided with the distribution. |
13 | # | | 13 | # |
14 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | | 14 | # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| @@ -356,26 +356,30 @@ ${TARGETFS}: prepare_md_post ${WORKFSTAB | | | @@ -356,26 +356,30 @@ ${TARGETFS}: prepare_md_post ${WORKFSTAB |
356 | @echo Setting rc_configured=YES in /etc/rc.conf ... | | 356 | @echo Setting rc_configured=YES in /etc/rc.conf ... |
357 | ${TOOL_SED} "s/rc_configured=NO/rc_configured=YES/" \ | | 357 | ${TOOL_SED} "s/rc_configured=NO/rc_configured=YES/" \ |
358 | < ${WORKDIR}/etc/rc.conf > ${WORKRCCONF} | | 358 | < ${WORKDIR}/etc/rc.conf > ${WORKRCCONF} |
359 | .if defined(IMAGEHOSTNAME) | | 359 | .if defined(IMAGEHOSTNAME) |
360 | @echo Setting hostname=${IMAGEHOSTNAME} in /etc/rc.conf ... | | 360 | @echo Setting hostname=${IMAGEHOSTNAME} in /etc/rc.conf ... |
361 | echo "hostname=${IMAGEHOSTNAME}" >> ${WORKRCCONF} | | 361 | echo "hostname=${IMAGEHOSTNAME}" >> ${WORKRCCONF} |
362 | .endif | | 362 | .endif |
363 | .if ${SWAPSECTORS} == 0 | | 363 | .if ${SWAPSECTORS} == 0 |
364 | @echo Setting no_swap=YES in /etc/rc.conf ... | | 364 | @echo Setting no_swap=YES in /etc/rc.conf ... |
365 | echo "no_swap=YES" >> ${WORKRCCONF} | | 365 | echo "no_swap=YES" >> ${WORKRCCONF} |
366 | @echo Setting savecore=NO in /etc/rc.conf ... | | 366 | @echo Setting savecore=NO in /etc/rc.conf ... |
367 | echo "savecore=NO" >> ${WORKRCCONF} | | 367 | echo "savecore=NO" >> ${WORKRCCONF} |
368 | .endif | | 368 | .endif |
| | | 369 | .if defined(RC_CONF_EXTRA) |
| | | 370 | @echo Adding contents of ${RC_CONF_EXTRA} to /etc/rc.conf ... |
| | | 371 | cat ${RC_CONF_EXTRA} >> ${WORKRCCONF} |
| | | 372 | .endif |
369 | ${INSTALL} ${COPY} -m 0644 ${WORKRCCONF} ${WORKDIR}/etc/rc.conf | | 373 | ${INSTALL} ${COPY} -m 0644 ${WORKRCCONF} ${WORKDIR}/etc/rc.conf |
370 | .if defined(IMGDIR_EXTRA) | | 374 | .if defined(IMGDIR_EXTRA) |
371 | @echo Copying extra dirs... | | 375 | @echo Copying extra dirs... |
372 | .for _SRCDIR _TARGET in ${IMGDIR_EXTRA} | | 376 | .for _SRCDIR _TARGET in ${IMGDIR_EXTRA} |
373 | @if [ ! -d ${_SRCDIR} ]; then \ | | 377 | @if [ ! -d ${_SRCDIR} ]; then \ |
374 | echo "${_SRCDIR} is not directory, aborting"; \ | | 378 | echo "${_SRCDIR} is not directory, aborting"; \ |
375 | false; \ | | 379 | false; \ |
376 | fi | | 380 | fi |
377 | ${MKDIR} ${MKDIRPERM} ${WORKDIR}/${_TARGET} | | 381 | ${MKDIR} ${MKDIRPERM} ${WORKDIR}/${_TARGET} |
378 | (cd ${_SRCDIR} ; \ | | 382 | (cd ${_SRCDIR} ; \ |
379 | ${TOOL_PAX} ${PAX_TIMESTAMP} -rw -pe -v \ | | 383 | ${TOOL_PAX} ${PAX_TIMESTAMP} -rw -pe -v \ |
380 | ${IMGDIR_EXCLUDE} \ | | 384 | ${IMGDIR_EXCLUDE} \ |
381 | . ${.OBJDIR}/${WORKDIR}/${_TARGET} ) | | 385 | . ${.OBJDIR}/${WORKDIR}/${_TARGET} ) |