[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] ezjail-admin src.conf PATCH



> To avoid having to rename the 2 different src.conf files depending on whether I'm upgrading
> host or jails, the following patch simply instructs the build to INSTEAD use the file
> /etc.src.conf.ezjail (if it exists) - if it doesn't exist, the existing behaviour or using
> /etc/src.conf remains.


Don't know what happened there. The wrong patch was attached. Sorry, this is the correct one:

--- ezjail-admin.orig	2010-05-04 23:21:24.000000000 +0100
+++ ezjail-admin	2010-05-22 15:23:37.000000000 +0100
@@ -872,8 +872,13 @@
     fi
 
     # make and setup our world, then split basejail and newjail
-    cd "${ezjail_sourcetree}" && env DESTDIR="${ezjail_jailfull}" make ${ezjail_installaction} || exerr "Error: The command 'make ${ezjail_installaction}' failed.\n  Refer to the error report(s) above."
-    cd "${ezjail_sourcetree}/etc" && env DESTDIR="${ezjail_jailfull}" make distribution || exerr "Error: The command 'make distribution' failed.\n  Refer to the error report(s) above."
+    if [ -r /etc/src.conf.ezjail ]; then
+      SRCCONF="SRCCONF=/etc/src.conf.ezjail"
+    else
+      SRCCONF=""
+    fi
+    cd "${ezjail_sourcetree}" && env DESTDIR="${ezjail_jailfull}" make ${SRCCONF} ${ezjail_installaction} || exerr "Error: The command 'make ${SRCCONF} ${ezjail_installaction}' failed.\n  Refer to the error report(s) above."
+    cd "${ezjail_sourcetree}/etc" && env DESTDIR="${ezjail_jailfull}" make ${SRCCONF} distribution || exerr "Error: The command 'make ${SRCCONF} distribution' failed.\n  Refer to the error report(s) above."
     ezjail_splitworld
 
   fi # installaction="none"
>