Permalink
Browse files

image: miniroot: Add support for copying an overlay dir into the mini…

…root
  • Loading branch information...
brd committed Dec 7, 2017
1 parent 7bad40b commit 7103324bf1e268a1dc743b8f49b7ee18652aaa5e
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/share/poudriere/image.sh
@@ -35,7 +35,8 @@ Parameters:
-f packagelist -- List of packages to install
-h hostname -- The image hostname
-j jail -- Jail
-m -- Build a miniroot image as well (for tar type images)
-m overlaydir -- Build a miniroot image as well (for tar type images), and
overlay this directory into the miniroot image
-n imagename -- The name of the generated image
-o outputdir -- Image destination directory
-p portstree -- Ports tree
@@ -98,6 +99,7 @@ mkminiroot() {
cp -p ${WRKDIR}/world/${f} ${mroot}/${f}
recursecopylib ${f}
done
cp -fRLp ${MINIROOT}/ ${mroot}/
makefs ${OUTPUTDIR}/miniroot ${mroot}
[ -f ${OUTPUTDIR}/miniroot.gz ] && rm ${OUTPUTDIR}/miniroot.gz
@@ -106,7 +108,7 @@ mkminiroot() {
. ${SCRIPTPREFIX}/common.sh
while getopts "c:f:h:j:mn:o:p:s:t:X:z:" FLAG; do
while getopts "c:f:h:j:m:n:o:p:s:t:X:z:" FLAG; do
case "${FLAG}" in
c)
[ -d "${OPTARG}" ] || err 1 "No such extract directory: ${OPTARG}"
@@ -127,7 +129,8 @@ while getopts "c:f:h:j:mn:o:p:s:t:X:z:" FLAG; do
JAILNAME=${OPTARG}
;;
m)
MINIROOT=1
[ -d "${OPTARG}" ] || err 1 "No such miniroot overlday directory: ${OPTARG}"
MINIROOT=$(realpath ${OPTARG})
;;
n)
IMAGENAME=${OPTARG}

0 comments on commit 7103324

Please sign in to comment.