From 97d94019946b7b1c0d80020bb0776694fb02f5b8 Mon Sep 17 00:00:00 2001
From: Marcel Telka <marcel@telka.sk>
Date: Tue, 02 Apr 2024 08:08:00 +0200
Subject: [PATCH] Add domdf_python_tools Python project

---
 Vagrantfile |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/Vagrantfile b/Vagrantfile
index a677dd0..81c80ed 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -13,6 +13,7 @@
 #
 # Copyright 2016 Adam Stevko. All rights reserved.
 # Copyright 2017 Michal Nowak
+# Copyright 2021 David Stes
 #
 
 Vagrant.configure("2") do |config|
@@ -39,7 +40,10 @@
     host = RbConfig::CONFIG['host_os']
 
     # Get memory size and CPU cores amount
-    if host =~ /darwin/
+    if host =~ /solaris/
+	mem = `/usr/sbin/prtconf|grep Memory|cut -f3 -d' '`.to_i * 1024 * 1024
+	cpus = `/usr/sbin/psrinfo|wc -l`.to_i
+    elsif host =~ /darwin/
         # sysctl returns Bytes
         mem = `sysctl -n hw.memsize`.to_i
         cpus = `sysctl -n hw.ncpu`.to_i
@@ -51,6 +55,9 @@
         # Windows code via https://github.com/rdsubhas/vagrant-faster
         mem = `wmic computersystem Get TotalPhysicalMemory`.split[1].to_i
         cpus = `echo %NUMBER_OF_PROCESSORS%`.to_i
+    else
+	puts "Unsupported operating system"
+	exit
     end
 
     # Give VM 1/4 system memory as well as CPU core count
@@ -60,6 +67,7 @@
     config.vm.provider "virtualbox" do |v|
         v.customize ["modifyvm", :id, "--memory", mem]
         v.customize ["modifyvm", :id, "--cpus", cpus]
+
         v.customize ["storagectl", :id, "--name", "SATA Controller", "--hostiocache", "on"]
         # Enable following line, if oi-userland directory is on non-rotational
         # drive (e.g. SSD). (This could be automated, but with all those storage

--
Gitblit v1.9.3