diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ecd3d01bf2..601b48081f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2013-04-07 Junichi Satoh + + * pandora_console_install, install.php: Added support for NetBSD. + + Contributed by Hiroki SHIMIZU. Thanks! + 2013-04-05 Miguel de Dios * mobile/operation/agents.php, mobile/operation/tactical.php, diff --git a/pandora_console/install.php b/pandora_console/install.php index 0dc4c0f2e5..fc4e40ebf8 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -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"); } diff --git a/pandora_console/pandora_console_install b/pandora_console/pandora_console_install index 09172d920f..cc91dc6e44 100755 --- a/pandora_console/pandora_console_install +++ b/pandora_console/pandora_console_install @@ -51,7 +51,12 @@ get_distro () { then LINUX_DISTRO=FreeBSD else - LINUX_DISTRO=GENERIC + if [ "$OS_NAME" = "NetBSD" ] + then + LINUX_DISTRO=NetBSD + else + LINUX_DISTRO=GENERIC + fi fi OS_VERSION=`uname -r` fi @@ -81,7 +86,12 @@ uninstall () { then PANDORA_HOME="/usr/local/www/data/pandora_console /usr/local/www/apache22/data/pandora_console" else - PANDORA_HOME=/srv/www/htdocs/pandora_console + 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 @@ -123,8 +133,14 @@ install () { fi PANDORA_CONF=$PANDORA_HOME/include/config.php else - PANDORA_HOME=/srv/www/htdocs/pandora_console - PANDORA_CONF=$PANDORA_HOME/include/config.php + 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 + fi fi fi fi @@ -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/