Permalink
Browse files

Fix bugs creating linux jails debian and gentoo via the Warden

This was a result of a merge with some FreeNAS changes which didn't apply to
our version of Warden
  • Loading branch information...
1 parent b0eb497 commit 5ae7c8ead4946f1ad0c6d8811304bef52536e9ee @kmoore134 kmoore134 committed Feb 14, 2014
@@ -27,6 +27,9 @@ template_install()
fi
debootstrap squeeze ${TDIR}
+ if [ $? -ne 0 ] ; then
+ exit 1
+ fi
umount -f ${TDIR}/dev/fd >/dev/null 2>/dev/null
umount -f ${TDIR}/dev >/dev/null 2>/dev/null
@@ -68,17 +71,14 @@ error()
main()
{
- case "${1}" in
- get_distfiles) shift; get_distfiles "$@" ;;
- template_install) shift; template_install "$@" ;;
- jail_configure) shift; jail_configure "$@" ;;
- error) shift; error "$@" ;;
- esac
-
- if [ "$?" != "0" ] ; then
- touch "${ERRORFILE}"
- fi
+
+ template_install "$1"
+
+ jail_configure "$3"
+
+ exit 0
}
+# Arg1 = Directory # Arg2 = IP # Arg3 = Meta File
main "$@"
@@ -2,6 +2,7 @@
# Script to install gentoo i386 release into a jail
# Author: Kris Moore <kris@pcbsd.org>
+JDIR="$1"
SELF="gentoo-stage3-i486"
SELFDIR="${JDIR}/.${SELF}"
INDEXFILE="latest-stage3-i486.txt"
@@ -214,17 +215,10 @@ error()
main()
{
- case "${1}" in
- get_distfiles) shift; get_distfiles "$@" ;;
- template_install) shift; template_install "$@" ;;
- jail_configure) shift; jail_configure "$@" ;;
- error) shift; error "$@" ;;
- esac
-
- if [ "$?" != "0" ] ; then
- touch "${ERRORFILE}"
- fi
+ get_distfiles
+ template_install "$1"
+ jail_configure "$3"
}
-
+# Arg1 = Directory # Arg2 = IP # Arg3 = Meta dir
main "$@"
@@ -14,6 +14,7 @@ setup_linux_jail()
mkdir -p ${JMETADIR}
echo "${HOST}" > ${JMETADIR}/host
+ echo "${HOST}" > ${JMETADIR}/id
if [ "${IP4}" != "OFF" ] ; then
echo "${IP4}/${MASK4}" > ${JMETADIR}/ipv4

0 comments on commit 5ae7c8e

Please sign in to comment.