Virtualmin successfully installed on NetBSD - report and request for help for some small problems

Hello everybody,
I’ve been able to install a fully working Virtualmin install on NetBSD 5-STABLE branch.

Follow the next steps to reproduce my result:

  1. Install the OS and install Webmin. The pkgsrc version is quite outdated, so it’s better to download and install it manually.
  2. Add the “netbsd” OS on the Virtualmin module config file, repack the gz and install on Webmin. Also install the theme, no modifications are needed here.
  3. Recompile NetBSD to support long usernames (if needed, as it must be done with FreeBSD) - the file to be changed is /usr/src/sys/sys/syslimits.h
  4. recomplile the procmail-wrapper.c, changing the path to procmail
  5. chang a line on the “virtualmin” script. The “id -a” must be changed to “id”. Everything works as expected, then.

The Webmin modules should be checked, then, as many fail the automatic configuration (generally speaking, they don’t point to /usr/pkg/… but to /usr/local/… and sometimes the pid file autodiscovery is wrong, so it doesn’t detect running services)

After those steps, Virtualmin is perfectly working and efficient on a NetBSD host.

I’m experiencing one problem, anyway: quotas are correctly calculated (both by Webmin and the system), and I can correctly see the Virtualmin calculating the single users’ quotas. It seems anyway to fail when calculating the whole Virtual Host quota.
I see exactly what’s been previously reported here: http://www.virtualmin.com/node/18599
I’ve tried to create the /dev/root link to my root device, but nothing changes.

Any idea on how to fix it?

Thank you.

Ok, I’ve performed some tests.
As far as I could see, trying to put some debug code and to compare it with a (working) Virtualmin installation on a Debian Linux machine, it seems that the “&get_domain_quota($d)” always returns just a “0”.
So I can see that:
As home space used, I always get something like: 0 bytes (1.82 GB by server administrator, 2.38 GB by mail / FTP users)
Database is correct: 128 kB (128 kB in this server, 0 bytes in sub-servers)
Total is: 128 kB

So the total just reflects the database status.

As I wrote before, the users and group quotas are correctly set in the system (I could see them both on Webmin quota module and issuing manually the quota commands on the shell).

I don’t know where to look at, anyway. I just tried to modify the code, but except some hacks (like reporting the sum of server adm, mail/ftp users and db as $total), I don’t know how to fix it.
Except that, Virtualmin is perfect on NetBSD