[PC-BSD Commits] r7383 - pcbsd/current/system-overlay/usr/PCBSD/portjail
svn at pcbsd.org
svn at pcbsd.org
Sun Aug 15 13:37:16 PDT 2010
Author: fatmice
Date: 2010-08-15 13:37:15 -0700 (Sun, 15 Aug 2010)
New Revision: 7383
Modified:
pcbsd/current/system-overlay/usr/PCBSD/portjail/portjail.sh
Log:
Removed advance environment and made it default, i.e. with linuxprocfs and /usr/src support.
Modified: pcbsd/current/system-overlay/usr/PCBSD/portjail/portjail.sh
===================================================================
--- pcbsd/current/system-overlay/usr/PCBSD/portjail/portjail.sh 2010-08-13 15:49:58 UTC (rev 7382)
+++ pcbsd/current/system-overlay/usr/PCBSD/portjail/portjail.sh 2010-08-15 20:37:15 UTC (rev 7383)
@@ -16,7 +16,7 @@
echo "--------------------------------"
echo "Usage:"
echo " portjail start - Starts the jail, root only"
- echo " portjail start adv - Starts the jail with linprocfs and /usr/src support (advance environment), root only"
+# echo " portjail start adv - Starts the jail with linprocfs and /usr/src support (advance environment), root only"
echo " portjail stop - Stops the jail, root only"
echo " portjail console - Starts a shell session within the jail"
echo " portjail run <cmd> - Runs the specified command within the jail"
@@ -97,12 +97,14 @@
mount -t devfs devfs ${PJDIR}/dev
mount -t procfs procfs ${PJDIR}/proc
# Add support for linprocfs and /usr/src for ports that need system source and linprocfs to build/run
- if [ "$2" = "adv" ]
+ mount_nullfs /usr/src ${PJDIR}/usr/src
+ if [ -d "${PJDIR}/compat/linux/proc" ]
then
- echo "Advance jail requested. Creating advance environment."
+ mount -t linprocfs linprocfs ${PJDIR}/compat/linux/proc
+ else
+ echo "compat/linux/proc does not exist. Adding linprocfs support"
mkdir -p ${PJDIR}/compat/linux/proc
- mount_nullfs /usr/src ${PJDIR}/usr/src
- mount -t linprocfs linproc ${PJDIR}/compat/linux/proc
+ mount -t linprocfs linprocfs ${PJDIR}/compat/linux/proc
fi
jail -n portjail ${PJDIR} ${PJHOST} ${PJIP} /bin/sh /etc/rc
@@ -118,19 +120,13 @@
# Stop the Jail
jexec portjail /bin/sh /etc/rc.shutdown
jail -r portjail
+ umount ${PJDIR}/compat/linux/proc
umount ${PJDIR}/proc
umount ${PJDIR}/dev
umount ${PJDIR}/tmp
umount ${PJDIR}/media
umount ${PJDIR}/usr/home
- # Remove advance environment directories
- if [ -d "${PJDIR}/compat" ]
- then
- echo "Removing advance environment setups."
- umount ${PJDIR}/usr/src
- umount ${PJDIR}/compat/linux/proc
- rm -rf ${PJDIR}/compat
- fi
+ umount ${PJDIR}/usr/src
ifconfig lo1 destroy
# Cleanup /etc/pf.conf
More information about the Commits
mailing list