2013-04-07 Junichi Satoh <junichi@rworks.jp>

* pandora_console_install, install.php: Added support for NetBSD.

	Contributed by Hiroki SHIMIZU. Thanks!



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7938 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
jsatoh 2013-04-07 06:53:53 +00:00
parent 8698407ad9
commit 4ff737663e
3 changed files with 30 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2013-04-07 Junichi Satoh <junichi@rworks.jp>
* pandora_console_install, install.php: Added support for NetBSD.
Contributed by Hiroki SHIMIZU. Thanks!
2013-04-05 Miguel de Dios <miguel.dedios@artica.es>
* mobile/operation/agents.php, mobile/operation/tactical.php,

View File

@ -498,6 +498,9 @@ function install_step2() {
if (PHP_OS == "FreeBSD") {
$res += check_exists ("/usr/local/bin/twopi","Graphviz Binary");
}
else if (PHP_OS == "NetBSD") {
$res += check_exists ("/usr/pkg/bin/twopi","Graphviz Binary");
}
else {
$res += check_exists ("/usr/bin/twopi","Graphviz Binary");
}

View File

@ -50,9 +50,14 @@ get_distro () {
if [ "$OS_NAME" = "FreeBSD" ]
then
LINUX_DISTRO=FreeBSD
else
if [ "$OS_NAME" = "NetBSD" ]
then
LINUX_DISTRO=NetBSD
else
LINUX_DISTRO=GENERIC
fi
fi
OS_VERSION=`uname -r`
fi
fi
@ -80,12 +85,17 @@ uninstall () {
if [ "$DISTRO" = "FreeBSD" ]
then
PANDORA_HOME="/usr/local/www/data/pandora_console /usr/local/www/apache22/data/pandora_console"
else
if [ "$DISTRO" = "NetBSD" ]
then
PANDORA_HOME="/usr/pkg/share/httpd/htdocs/pandora_console"
else
PANDORA_HOME=/srv/www/htdocs/pandora_console
fi
fi
fi
fi
fi
echo "Removing Pandora FMS Console"
rm -Rf $PANDORA_HOME
@ -122,6 +132,11 @@ install () {
PANDORA_HOME=/usr/local/www/data/pandora_console
fi
PANDORA_CONF=$PANDORA_HOME/include/config.php
else
if [ "$DISTRO" = "NetBSD" ]
then
PANDORA_HOME=/usr/pkg/share/httpd/htdocs/pandora_console
PANDORA_CONF=$PANDORA_HOME/include/config.php
else
PANDORA_HOME=/srv/www/htdocs/pandora_console
PANDORA_CONF=$PANDORA_HOME/include/config.php
@ -129,6 +144,7 @@ install () {
fi
fi
fi
fi
echo "Detecting operating system: $DISTRO"
@ -190,7 +206,7 @@ install () {
chown -R apache:apache $PANDORA_HOME
chown -R pandora:apache /var/spool/pandora/
else
if [ "$DISTRO" = "FreeBSD" ]
if [ "$DISTRO" = "FreeBSD" -o "$DISTRO" = "NetBSD" ]
then
chown -R www:www $PANDORA_HOME
chown -R pandora:www /var/spool/pandora/