[PC-BSD Commits] r7776 - in pcbsd: current/system-overlay/usr/PCBSD/portjail stable/system-overlay/usr/PCBSD/portjail

svn at pcbsd.org svn at pcbsd.org
Tue Oct 12 07:51:15 PDT 2010


Author: kris
Date: 2010-10-12 07:51:15 -0700 (Tue, 12 Oct 2010)
New Revision: 7776

Modified:
   pcbsd/current/system-overlay/usr/PCBSD/portjail/portjail.sh
   pcbsd/stable/system-overlay/usr/PCBSD/portjail/portjail.sh
Log:

Added patch from J. Paetzel which fixes cleanup of pf.conf



Modified: pcbsd/current/system-overlay/usr/PCBSD/portjail/portjail.sh
===================================================================
--- pcbsd/current/system-overlay/usr/PCBSD/portjail/portjail.sh	2010-10-10 18:02:22 UTC (rev 7775)
+++ pcbsd/current/system-overlay/usr/PCBSD/portjail/portjail.sh	2010-10-12 14:51:15 UTC (rev 7776)
@@ -62,7 +62,7 @@
   
 
   # Configure NAT with PF
-  sed -i -e '/from lo1:network to any/d' /etc/pf.conf
+  sed -i -e '/.*from lo1:network to any/d' /etc/pf.conf
 
   TMPIF=`ifconfig -l`
   for i in ${TMPIF}
@@ -84,11 +84,11 @@
   fi
 
   # Add the hostname to the portjails /etc/hosts file, to prevent sendmail warnings
-  sed -i -e '/127.0.0.1/d' ${PJDIR}/etc/hosts
+  sed -i -e '/127.0.0.1.*/d' ${PJDIR}/etc/hosts
   echo "127.0.0.1               localhost localhost.my.domain ${PJHOST}" >>${PJDIR}/etc/hosts
 
   # Make sure the /etc/rc.conf HOSTNAME values match
-  sed -i -e '/hostname=/d' ${PJDIR}/etc/rc.conf
+  sed -i -e '/hostname=.*/d' ${PJDIR}/etc/rc.conf
   echo "hostname=\"$PJHOST\"" >> ${PJDIR}/etc/rc.conf
 
   mount_nullfs /tmp ${PJDIR}/tmp
@@ -130,7 +130,7 @@
   ifconfig lo1 destroy
 
   # Cleanup /etc/pf.conf
-  sed -i -e '/from lo1:network to any/d' /etc/pf.conf
+  sed -i "" -e '/.*from lo1:network to any/d' /etc/pf.conf
 
 elif [ "$1" = "console" ]
 then

Modified: pcbsd/stable/system-overlay/usr/PCBSD/portjail/portjail.sh
===================================================================
--- pcbsd/stable/system-overlay/usr/PCBSD/portjail/portjail.sh	2010-10-10 18:02:22 UTC (rev 7775)
+++ pcbsd/stable/system-overlay/usr/PCBSD/portjail/portjail.sh	2010-10-12 14:51:15 UTC (rev 7776)
@@ -62,7 +62,7 @@
   
 
   # Configure NAT with PF
-  sed -i -e '/from lo1:network to any/d' /etc/pf.conf
+  sed -i -e '/.*from lo1:network to any/d' /etc/pf.conf
 
   TMPIF=`ifconfig -l`
   for i in ${TMPIF}
@@ -84,11 +84,11 @@
   fi
 
   # Add the hostname to the portjails /etc/hosts file, to prevent sendmail warnings
-  sed -i -e '/127.0.0.1/d' ${PJDIR}/etc/hosts
+  sed -i -e '/127.0.0.1.*/d' ${PJDIR}/etc/hosts
   echo "127.0.0.1               localhost localhost.my.domain ${PJHOST}" >>${PJDIR}/etc/hosts
 
   # Make sure the /etc/rc.conf HOSTNAME values match
-  sed -i -e '/hostname=/d' ${PJDIR}/etc/rc.conf
+  sed -i -e '/hostname=.*/d' ${PJDIR}/etc/rc.conf
   echo "hostname=\"$PJHOST\"" >> ${PJDIR}/etc/rc.conf
 
   mount_nullfs /tmp ${PJDIR}/tmp
@@ -130,7 +130,7 @@
   ifconfig lo1 destroy
 
   # Cleanup /etc/pf.conf
-  sed -i -e '/from lo1:network to any/d' /etc/pf.conf
+  sed -i "" -e '/.*from lo1:network to any/d' /etc/pf.conf
 
 elif [ "$1" = "console" ]
 then



More information about the Commits mailing list