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

ezjail-admin src.conf PATCH



Hi, great tool!

I've just made one slight modification that you may want to include.

Basically, I have a customised machine build using /etc/src.conf (man src.conf)

I additionally have a restricted jail configuration, as follows:

WITHOUT_ACPI=YES
WITHOUT_APM=YES
WITHOUT_ASSERT_DEBUG=YES
WITHOUT_ATM=YES
WITHOUT_BLUETOOTH=YES
WITHOUT_BOOT=YES
WITHOUT_FLOPPY=YES
WITHOUT_GPIB=YES
WITH_IDEA=YES
WITHOUT_IPFILTER=YES
WITHOUT_IPFW=YES
WITHOUT_IPX=YES
WITHOUT_KVM=YES
WITHOUT_LEGACY_CONSOLE=YES
WITHOUT_NCP=YES
WITHOUT_PF=YES
WITHOUT_PROFILE=YES
WITHOUT_SENDMAIL=YES
WITHOUT_SYSCONS=YES
WITHOUT_USB=YES
WITHOUT_WIRELESS=YES
WITHOUT_WPA_SUPPLICANT_EAPOL=YES

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.

You may also want to distribute an /etc/src.conf.ezjail file similar to the above.
Cheers,

Jamie

--- 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="/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"