Added bootstrap for the currently existing PCU types and Protocol types.
[myplc.git] / build.functions
index 15277e4..8ab1c7e 100644 (file)
@@ -46,37 +46,12 @@ set -e
 # Be verbose
 set -x
 
-# Make a basic chroot at the specified location given the specified
-# configuration.
-make_chroot_from_lst() {
-    root=$1
-    lst=$2
-
-    packages=$(pl_getPackagesOptions $lst)
-    groups=$(pl_getGroupsOptions $lst) 
-
-    pl_setup_chroot $root $packages $groups
-}
-
-# Move specified directories out of the chroot and into a "data"
-# directory that will be bind mounted on /data inside the chroot.
-#move_datadirs() {
-#    root=$1
-#    data=$2
-#    shift 2
-#    pl_move_dirs $root $data /data "$@"
-#}
-
-# Make loopback filesystem from specified location
-#make_image() {
-#    root=$1
-#    image=$2
-#    pl_make_image $root $image 100000000
-#}
-
 function yum_conf_to_build_host () {
    BUILD_HOST=$(hostname)
-   cat <<EOF
+
+   case "$pl_DISTRO" in
+       Fedora)
+          cat <<EOF
 [main]
 cachedir=/var/cache/yum
 debuglevel=2
@@ -93,22 +68,27 @@ gpgcheck=0
 reposdir=/dev/null
 
 [base]
-name=Fedora Core 4 - i386 - base
-baseurl=http://${BUILD_HOST}/fedora/linux/core/${PLC_DEVEL_FEDORA_RELEASE}/${PLC_DEVEL_FEDORA_ARCH}/os/
+name=${pl_DISTRO_NAME} - base
+baseurl=http://${BUILD_HOST}/fedora/linux/core/${pl_DISTRO_RELEASE}/${pl_DISTRO_ARCH}/os/
 
 
 [updates]
-name=Fedora Core 4 - i386 - updates
-baseurl=http://${BUILD_HOST}/fedora/linux/core/updates/${PLC_DEVEL_FEDORA_RELEASE}/${PLC_DEVEL_FEDORA_ARCH}/
+name=${pl_DISTRO_NAME} - updates
+baseurl=http://${BUILD_HOST}/fedora/linux/core/updates/${pl_DISTRO_RELEASE}/${pl_DISTRO_ARCH}/
 
-$(if [ "${PLC_DEVEL_FEDORA_RELEASE}" -le 6 ] ; then cat << EXTRAS
+$(if [ "${pl_DISTRO_RELEASE}" -le 6 ] ; then cat << EXTRAS
 [extras]
-name=Fedora Core 4 - i386 - extras
-baseurl=http://${BUILD_HOST}/fedora/linux/extras/${PLC_DEVEL_FEDORA_RELEASE}/${PLC_DEVEL_FEDORA_ARCH}/
+name=${pl_DISTRO_NAME} - extras
+baseurl=http://${BUILD_HOST}/fedora/linux/extras/${pl_DISTRO_RELEASE}/${pl_DISTRO_ARCH}/
 EXTRAS
 fi)
 EOF
-
+    ;;
+       *)
+          echo "$0: no support for this distribution $pl_DISTRO"
+          exit 1
+          ;;
+   esac
 }
 
 function sudoers_bootcustom_apache () {