Parcourir la source

Changes from OS-X testing

John C. Frickson il y a 10 ans
Parent
commit
21124f1fd5
4 fichiers modifiés avec 20 ajouts et 14 suppressions
  1. 2 1
      .gitignore
  2. 6 7
      Makefile.in
  3. 6 3
      build-aux/ax_nagios_get_paths
  4. 6 3
      configure

+ 2 - 1
.gitignore

@@ -31,6 +31,7 @@ startup/newbsd-init
 startup/openrc-conf
 startup/openrc-init
 startup/rh-upstart-init
-startup/solaris-PKG_NAME.xml
+startup/solaris-inetd.xml
+startup/solaris-init.xml
 startup/tmpfile.conf
 startup/upstart-init

+ 6 - 7
Makefile.in

@@ -158,13 +158,12 @@ install-groups:
 		groupadd $(NAGIOS_GROUP) || true;\
 		echo groupadd $(NRPE_GROUP);\
 		groupadd $(NRPE_GROUP) || true;\
-	elif test $(OPSYS) = osx; then\
+	elif test $(DIST) = osx; then\
 		newid=`dscl . -list /Groups gid | tr -s ' ' | cut -d' ' -f2 | sort -n | tail -1`;\
-		newid=`expr 1 + $newid`;\
-		newid=`expr 1 + $newid`;\
+		newid=`expr 1 + $$newid`;\
 		echo dscl . -create /Groups/$(NAGIOS_GROUP) gid $$newid;\
 		dscl . -create /Groups/$(NAGIOS_GROUP) gid $$newid;\
-		newid=`expr 1 + $newid`;\
+		newid=`expr 1 + $$newid`;\
 		echo dscl . -create /Groups/$(NRPE_GROUP) gid $$newid;\
 		dscl . -create /Groups/$(NRPE_GROUP) gid $$newid;\
 	elif test $(DIST) = "freebsd"; then\
@@ -190,16 +189,16 @@ install-users:
 		useradd -m -g $(NAGIOS_GROUP) $(NAGIOS_USER) || true;\
 		echo useradd -m -g $(NRPE_GROUP) $(NRPE_USER);\
 		useradd -m -g $(NRPE_GROUP) $(NRPE_USER) || true;\
-	elif test $(OPSYS) = osx; then\
+	elif test $(DIST) = osx; then\
 		newid=`dscl . -list /Users UniqueID | tr -s ' ' | cut -d' ' -f2 | sort -n | tail -1`;\
-		newid=`expr 1 + $newid`;\
+		newid=`expr 1 + $$newid`;\
 		echo dscl . -create /Users/$(NAGIOS_USER);\
 		echo dscl . -create /Users/$(NAGIOS_USER) UniqueID $$newid;\
 		echo dscl . -append /Groups/$(NAGIOS_GROUP) GroupMembership $(NAGIOS_USER);\
 		dscl . -create /Users/$(NAGIOS_USER);\
 		dscl . -create /Users/$(NAGIOS_USER) UniqueID $$newid;\
 		dscl . -append /Groups/$(NAGIOS_GROUP) GroupMembership $(NAGIOS_USER);\
-		newid=`expr 1 + $newid`;\
+		newid=`expr 1 + $$newid`;\
 		echo dscl . -create /Users/$(NRPE_USER);\
 		echo dscl . -create /Users/$(NRPE_USER) UniqueID $$newid;\
 		echo dscl . -append /Groups/$(NRPE_GROUP) GroupMembership $(NRPE_USER);\

+ 6 - 3
build-aux/ax_nagios_get_paths

@@ -217,6 +217,9 @@ if test $install_method = "default"; then
 		if test x"$prefix" = "xNONE"; then prefix=${ac_default_prefix}; fi
 	fi
 	datarootdir=${datarootdir="$prefix"}
+	if test "$prefix" = /opt; then prefix="/opt/nagios"
+	elif test "$prefix" = /opt/local; then prefix="/opt/local/nagios"
+	fi
 
 elif test $install_method = "opt"; then
 	if test x"$prefix" = "xNONE"; then prefix="/opt/nagios"; fi
@@ -226,7 +229,7 @@ else
 	if test x"$sysconfdir" = x'${prefix}/etc'; then AS_UNSET(sysconfdir); fi
 
 	if test x"$prefix" = "xNONE"; then
-		if test $dist_type = freebsd -o $dist_type = openbsd; then
+		if test $dist_type = freebsd -o $dist_type = openbsd -o $dist_type = osx; then
 			prefix="/usr/local"
 		elif test $dist_type = netbsd; then
 			prefix="/usr/pkg"
@@ -236,7 +239,7 @@ else
 	fi
 	if test x"$exec_prefix" = "xNONE"; then exec_prefix=$prefix; fi
 	if test x"$localstatedir" = x'${prefix}/var'; then
-		if test $opsys = "osx"; then
+		if test $dist_type = "osx"; then
 			localstatedir="/private/var"
 		else
 			localstatedir="/var"
@@ -258,7 +261,7 @@ else
 		if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
 			libexecdir=${exec_prefix}/libexec/nagios;
 		fi
-	elif test $opsys = "osx"; then
+	elif test $dist_type = "osx"; then
 		if test x"$sbindir" = x'${exec_prefix}/sbin'; then
 			sbindir="$libexecdir"
 		fi

+ 6 - 3
configure

@@ -3289,6 +3289,9 @@ if test $install_method = "default"; then
 		if test x"$prefix" = "xNONE"; then prefix=${ac_default_prefix}; fi
 	fi
 	datarootdir=${datarootdir="$prefix"}
+	if test "$prefix" = /opt; then prefix="/opt/nagios"
+	elif test "$prefix" = /opt/local; then prefix="/opt/local/nagios"
+	fi
 
 elif test $install_method = "opt"; then
 	if test x"$prefix" = "xNONE"; then prefix="/opt/nagios"; fi
@@ -3298,7 +3301,7 @@ else
 	if test x"$sysconfdir" = x'${prefix}/etc'; then { sysconfdir=; unset sysconfdir;}; fi
 
 	if test x"$prefix" = "xNONE"; then
-		if test $dist_type = freebsd -o $dist_type = openbsd; then
+		if test $dist_type = freebsd -o $dist_type = openbsd -o $dist_type = osx; then
 			prefix="/usr/local"
 		elif test $dist_type = netbsd; then
 			prefix="/usr/pkg"
@@ -3308,7 +3311,7 @@ else
 	fi
 	if test x"$exec_prefix" = "xNONE"; then exec_prefix=$prefix; fi
 	if test x"$localstatedir" = x'${prefix}/var'; then
-		if test $opsys = "osx"; then
+		if test $dist_type = "osx"; then
 			localstatedir="/private/var"
 		else
 			localstatedir="/var"
@@ -3330,7 +3333,7 @@ else
 		if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
 			libexecdir=${exec_prefix}/libexec/nagios;
 		fi
-	elif test $opsys = "osx"; then
+	elif test $dist_type = "osx"; then
 		if test x"$sbindir" = x'${exec_prefix}/sbin'; then
 			sbindir="$libexecdir"
 		fi