# Client only - Install plugins for this architecture
OSTYPE:=$(shell uname | tr '[A-Z]''[a-z]')
# How to figure out the hostname. (Only used in default configuration
# files)
HOSTNAME:=$(shell hostname)
# What is the safest way to create a tempfile.
# Default is to figure it out by testing various methods.
# Replace this with a known platform-specific method
MKTEMP:=$(shell ./test-mktemp)
# Munin version number.
VERSION:=$(shell ./getversion)
# User to run munin as
USER:= munin
GROUP:= munin
# Default user to run the plugins as
PLUGINUSER:= nobody
# Which command to use to check if the USER and GROUP to run Munin as, exists.
# These will work on most modern OSes:
#
GETENT:=$(shell which getent || which true 2>/dev/null)
CHECKUSER:=true
CHECKGROUP:=true
#CHECKUSER := $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
#CHECKGROUP := $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
# For OSX, comment out the previous two lines and comment in these
#
#CHECKUSER := $(shell nicl . -read /users/$(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
#CHECKGROUP := $(shell nicl . -read /groups/$(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
# For OSX 10.5 (Leopard), use the following two lines instead of what's above
#
#CHECKUSER := $(shell dscl . -read /Users/$(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
#CHECKGROUP := $(shell dscl . -read /Groups/$(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
# For HP-UX, use these instead:
#
#CHECKUSER := $(shell pwget -n $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistent. Create the user and retry; exit 2"))
#CHECKGROUP := $(shell grget -n $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistent. Create the group and retry; exit 2"))
CHOWN:=echo Not done: chown
CHMOD:=echo Not done: chmod
CHGRP:=echo Not done: chgrp
# Java compiler stuff - only needed on the buildhost