From 424cf4477182630ee80d54cc85b9a466b5d6653b Mon Sep 17 00:00:00 2001 From: Bernhard Ehlers Date: Tue, 19 Jan 2016 14:32:49 +0100 Subject: [PATCH] Ostinato uses tinycore-linux.json as packer base --- appliances/ostinato.gns3a | 10 +++--- packer/tinycore-linux/README.rst | 31 +++++++++---------- .../tinycore-linux/scripts/ostinato-drone.sh | 1 + packer/tinycore-linux/scripts/ostinato.sh | 29 ++++------------- 4 files changed, 27 insertions(+), 44 deletions(-) diff --git a/appliances/ostinato.gns3a b/appliances/ostinato.gns3a index f6cf211..48519e2 100644 --- a/appliances/ostinato.gns3a +++ b/appliances/ostinato.gns3a @@ -25,19 +25,19 @@ }, "images": [ { - "filename": "ostinato-0.7.1-2.qcow2", + "filename": "ostinato-0.7.1-3.qcow2", "version": "0.7.1", - "md5sum": "68895c56addf4a9ce0f2db9c9ed288d2", - "filesize": 56295424, + "md5sum": "d1b1173ab4ad12b3b4e34c3b078dcd9e", + "filesize": 57081856, "download_url": "http://www.bernhard-ehlers.de/projects/ostinato4gns3/index.html", - "direct_download_url": "http://www.bernhard-ehlers.de/projects/ostinato4gns3/ostinato-0.7.1-2.qcow2" + "direct_download_url": "http://www.bernhard-ehlers.de/projects/ostinato4gns3/ostinato-0.7.1-3.qcow2" } ], "versions": [ { "name": "0.7.1", "images": { - "hda_disk_image": "ostinato-0.7.1-2.qcow2" + "hda_disk_image": "ostinato-0.7.1-3.qcow2" } } ] diff --git a/packer/tinycore-linux/README.rst b/packer/tinycore-linux/README.rst index 1ff337a..4d0a9dc 100644 --- a/packer/tinycore-linux/README.rst +++ b/packer/tinycore-linux/README.rst @@ -38,22 +38,6 @@ A build of Core with Openvswitch preinstalled. packer build -var-file=openvswitch.json core64-linux.json -Ostinato -''''''''' - -A build of Core with Ostinato drone preinstalled. - -.. code:: bash - - packer build -var-file=ostinato.json core-linux.json - -A drone-only VM can be build with: - -.. code:: bash - - packer build -var-file=ostinato-drone.json core-linux.json - - Internet '''''''' An appliance for simulating a domestic modem. eth0 as a dhcp and eth1 should be a nat interface. @@ -82,3 +66,18 @@ A build of Tiny Core with Firefox preinstalled. packer build -var-file=tinycore-linux-firefox.json tinycore-linux.json + +Ostinato +''''''''' + +A build of Tiny Core with Ostinato GUI + drone preinstalled. + +.. code:: bash + + packer build -var-file=ostinato.json tinycore-linux.json + +A drone-only VM without GUI can be build with: + +.. code:: bash + + packer build -var-file=ostinato-drone.json core-linux.json diff --git a/packer/tinycore-linux/scripts/ostinato-drone.sh b/packer/tinycore-linux/scripts/ostinato-drone.sh index 0903f0a..0dc3af6 100644 --- a/packer/tinycore-linux/scripts/ostinato-drone.sh +++ b/packer/tinycore-linux/scripts/ostinato-drone.sh @@ -125,6 +125,7 @@ if grep -q -w nodhcp /proc/cmdline; then fi # start ostinato drone +sleep 2 HOME=/home/gns3 drone < /dev/null > /var/log/ostinato-drone.log 2>&1 & EOF diff --git a/packer/tinycore-linux/scripts/ostinato.sh b/packer/tinycore-linux/scripts/ostinato.sh index 5df31cc..b171760 100644 --- a/packer/tinycore-linux/scripts/ostinato.sh +++ b/packer/tinycore-linux/scripts/ostinato.sh @@ -4,28 +4,6 @@ set -x # setup environment . /etc/profile -# Install the GUI -tce-load -wi fltk-1.3 -tce-load -wi flwm -tce-load -wi Xorg-7.7 -tce-load -wi wbar -tce-load -wi Xprogs -tce-load -wi Xlibs -tce-load -wi aterm - -# set X resolution to 800x600 -cat > 99-resolution.conf <<'EOF' -Section "Screen" - Identifier "Screen0" - DefaultDepth 24 - SubSection "Display" - Modes "800x600" - EndSubSection -EndSection -EOF -sudo mv 99-resolution.conf /usr/local/share/X11/xorg.conf.d/ -echo usr/local/share/X11/xorg.conf.d >> /opt/.filetool.lst - # load the dependencies for ostinato tce-load -wi qt-4.x-base tce-load -wi qt-4.x-script @@ -88,10 +66,14 @@ cat > ostinato.desktop <<'EOF' Name=Ostinato Exec=ostinato Type=Application -OnlyShowIn=Old; +X-FullPathIcon=/usr/local/share/pixmaps/ostinato_logo.png +Icon=ostinato_logo.png Categories=System; EOF sudo mv ostinato.desktop /tmp/ostinato/usr/local/share/applications/ +sudo mkdir -p /tmp/ostinato/usr/local/share/pixmaps +sudo cp -p client/icons/logo.png /tmp/ostinato/usr/local/share/pixmaps/ostinato_logo.png +chmod 644 /tmp/ostinato/usr/local/share/pixmaps/ostinato_logo.png sudo chown -R root:root /tmp/ostinato sudo chmod +s /tmp/ostinato/usr/local/bin/drone cd .. @@ -143,6 +125,7 @@ if grep -q -w nodhcp /proc/cmdline; then fi # start ostinato drone +sleep 2 HOME=/home/gns3 drone < /dev/null > /var/log/ostinato-drone.log 2>&1 & EOF