diff --git a/qubeize_image_appvm b/qubeize_image_appvm new file mode 100755 index 0000000..67c8cdf --- /dev/null +++ b/qubeize_image_appvm @@ -0,0 +1,59 @@ +#!/bin/sh + +CLEANIMG=$1 +NAME=$2 + +if [ $# -eq 0 ]; then +echo "usage $0 " +exit +fi + +if [ x$CLEANIMG = x ]; then +echo "Image file not specified!" +exit 1 +fi + +if [ x$NAME = x ]; then +echo "Name not given!" +exit 1 +fi + +ID=$(id -ur) + +if [ $ID != 0 ] ; then + echo "This script should be run as root user." + exit 1 +fi + + +IMG=qubeized_images/$NAME-root.img +echo "--> Copying $CLEANIMG to $IMG..." +cp $CLEANIMG $IMG || exit 1 + +echo "--> Mouting $IMG" + +mkdir -p mnt +mount -o loop,offset=$((63*512)) qubeized_images/$NAME-root.img mnt || exit 1 + +echo "--> Installing RPMs..." +rpm --force --root=$(pwd)/mnt -ihv rpms_to_install_appvm/* + + +echo "--> Copying the Apps Menu shortcuts..." +APPSORIG=qubeized_images/$NAME-apps.orig +APPSTEMPL=qubeized_images/$NAME-apps.templates +mkdir -p $APPSORIG +cp -r $(pwd)/mnt/usr/share/applications/* $APPSORIG + +echo "--> Createing the Apps Menu templates..." +./create_apps_templates.sh $APPSORIG $APPSTEMPL + +echo "--> Installing 3rd party apps" +./add_3rd_party_software.sh + + +echo "--> Unmounting $IMG" +umount mnt + +echo "Qubeized image stored at: $IMG" + diff --git a/qubeize_image b/qubeize_image_netvm similarity index 63% rename from qubeize_image rename to qubeize_image_netvm index 0c6d820..428d9f9 100755 --- a/qubeize_image +++ b/qubeize_image_netvm @@ -2,20 +2,20 @@ CLEANIMG=$1 NAME=$2 -IS_NETVM=$3 if [ $# -eq 0 ]; then echo "usage $0 " -echo "usage $0 netvm" exit fi if [ x$CLEANIMG = x ]; then echo "Image file not specified!" +exit 1 fi if [ x$NAME = x ]; then echo "Name not given!" +exit 1 fi ID=$(id -ur) @@ -36,7 +36,7 @@ mkdir -p mnt mount -o loop,offset=$((63*512)) qubeized_images/$NAME-root.img mnt || exit 1 echo "--> Installing RPMs..." -rpm --force --root=$(pwd)/mnt -ihv rpms_to_install/* +rpm --force --nodeps --root=$(pwd)/mnt -ihv rpms_to_install_netvm/* echo "--> Copying the Apps Menu shortcuts..." @@ -45,22 +45,11 @@ APPSTEMPL=qubeized_images/$NAME-apps.templates mkdir -p $APPSORIG cp -r $(pwd)/mnt/usr/share/applications/* $APPSORIG -if [ x$IS_NETVM != x ]; then - if ! [ -d netvm/apps.templates ] ; then - echo "--> ERROR: Missing netvm/apps.templates directory." - exit 1 - fi -else - echo "--> Createing the Apps Menu templates..." - ./create_apps_templates.sh $APPSORIG $APPSTEMPL +if ! [ -d netvm/apps.templates ] ; then +echo "--> ERROR: Missing netvm/apps.templates directory." +exit 1 fi -if [ x$IS_NETVM == x ]; then - echo "--> Installing 3rd party apps" - ./add_3rd_party_software.sh -fi - - echo "--> Unmounting $IMG" umount mnt diff --git a/rpms_to_install_appvm b/rpms_to_install_appvm new file mode 120000 index 0000000..a439a37 --- /dev/null +++ b/rpms_to_install_appvm @@ -0,0 +1 @@ +rpms_to_install_appvm_x64/ \ No newline at end of file diff --git a/rpms_to_install_netvm b/rpms_to_install_netvm new file mode 120000 index 0000000..0a90084 --- /dev/null +++ b/rpms_to_install_netvm @@ -0,0 +1 @@ +rpms_to_install_netvm_x64/ \ No newline at end of file