diff --git a/base/etc/one-context.d/01-dns b/base.one/etc/one-context.d/01-dns similarity index 100% rename from base/etc/one-context.d/01-dns rename to base.one/etc/one-context.d/01-dns diff --git a/base/etc/one-context.d/04-mount-swap b/base.one/etc/one-context.d/04-mount-swap similarity index 100% rename from base/etc/one-context.d/04-mount-swap rename to base.one/etc/one-context.d/04-mount-swap diff --git a/base/etc/one-context.d/07-grow-rootfs b/base.one/etc/one-context.d/07-grow-rootfs similarity index 100% rename from base/etc/one-context.d/07-grow-rootfs rename to base.one/etc/one-context.d/07-grow-rootfs diff --git a/base_deb/etc/init.d/vmcontext b/base_deb.one/etc/init.d/vmcontext similarity index 100% rename from base_deb/etc/init.d/vmcontext rename to base_deb.one/etc/init.d/vmcontext diff --git a/base_deb/etc/one-context.d/00-network b/base_deb.one/etc/one-context.d/00-network similarity index 100% rename from base_deb/etc/one-context.d/00-network rename to base_deb.one/etc/one-context.d/00-network diff --git a/base_deb/etc/one-context.d/05-hostname b/base_deb.one/etc/one-context.d/05-hostname similarity index 100% rename from base_deb/etc/one-context.d/05-hostname rename to base_deb.one/etc/one-context.d/05-hostname diff --git a/base_rpm/etc/init.d/vmcontext b/base_rpm.one/etc/init.d/vmcontext similarity index 100% rename from base_rpm/etc/init.d/vmcontext rename to base_rpm.one/etc/init.d/vmcontext diff --git a/base_rpm/etc/one-context.d/00-network b/base_rpm.one/etc/one-context.d/00-network similarity index 100% rename from base_rpm/etc/one-context.d/00-network rename to base_rpm.one/etc/one-context.d/00-network diff --git a/base_rpm/etc/one-context.d/05-hostname b/base_rpm.one/etc/one-context.d/05-hostname similarity index 100% rename from base_rpm/etc/one-context.d/05-hostname rename to base_rpm.one/etc/one-context.d/05-hostname diff --git a/generate.sh b/generate.sh index 8ee22d8..4585b4f 100755 --- a/generate.sh +++ b/generate.sh @@ -16,10 +16,18 @@ # limitations under the License. # #--------------------------------------------------------------------------- # +ENVIRONMENT=${ENVIRONMENT:-one} + +if [ $ENVIRONMENT != "one" ]; then + DEFAULT_NAME="one-context-$ENVIRONMENT" +else + DEFAULT_NAME="one-context" +fi + VERSION=${VERSION:-4.14.3} MAINTAINER=${MAINTAINER:-OpenNebula Systems } LICENSE=${LICENSE:-Apache 2.0} -PACKAGE_NAME=${PACKAGE_NAME:-one-context} +PACKAGE_NAME=${PACKAGE_NAME:-$DEFAULT_NAME} VENDOR=${VENDOR:-OpenNebula Systems} DESC=" This package prepares a VM image for OpenNebula: @@ -49,8 +57,13 @@ rm $NAME rm -rf tmp mkdir tmp + cp -r base/* tmp +test -d base.$ENVIRONMENT && cp -r base.$ENVIRONMENT/* tmp + cp -r base_$PACKAGE_TYPE/* tmp +test -d base_$PACKAGE_TYPE.$ENVIRONMENT && \ + cp -r base_$PACKAGE_TYPE.$ENVIRONMENT/* tmp for i in $*; do cp -r "$i" tmp