Ticket #18771: patch-Makefile.config

File patch-Makefile.config, 1.7 KB (added by adambyrtek@…, 16 years ago)

Leopard compatibility fix (use dscl instead of nicl)

Line 
1diff -r 0e0f9e28d8e6 Makefile.config
2--- Makefile.config     Sat Mar 07 22:18:01 2009 +0100
3+++ Makefile.config     Mon Mar 09 09:41:58 2009 +0100
4@@ -87,16 +87,17 @@
5 GROUP      = munin
6 
7 # Default user to run the plugins as
8-PLUGINUSER = nobody
9+#PLUGINUSER = nobody
10+PLUGINUSER = munin
11 
12 # Which command to use to check if the USER and GROUP to run Munin as, exists.
13 GETENT = $(shell which getent || which true 2>/dev/null)
14-CHECKUSER  = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
15-CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
16+#CHECKUSER  = $(shell $(GETENT) passwd $(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
17+#CHECKGROUP = $(shell $(GETENT) group $(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
18 
19 # For OSX, comment out the previous two lines and comment in these
20-#CHECKUSER  = $(shell nicl . -read /users/$(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
21-#CHECKGROUP = $(shell nicl . -read /groups/$(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
22+CHECKUSER  = $(shell dscl . -read /users/$(USER) >/dev/null 2>/dev/null || (echo "echo User $(USER) nonexistant. Create the user and retry; exit 2"))
23+CHECKGROUP = $(shell dscl . -read /groups/$(GROUP) >/dev/null 2>/dev/null || (echo "echo Group $(GROUP) nonexistant. Create the group and retry; exit 2"))
24 
25 CHOWN      = chown
26 CHMOD      = chmod