dan (ddp) wrote:
On Mon, Mar 11, 2013 at 10:42 AM, Shane R<[email protected]>  wrote:
>  Try this.I ran into the same problems.
>
>  
http://rabbit6.com/2012/10/01/install-ossec-on-os-x-mountain-lion-10-8-how-to/
>

I think this patch might help.


It would, but it will bite someone in the ass when 10.9 comes out. See if this isn't better:
--- InstallAgent.sh     2012-11-08 21:24:55.000000000 -0500
+++ InstallAgent.sh.osx 2013-03-11 11:16:44.000000000 -0400
@@ -64,17 +64,19 @@

 # Thanks Chuck L. for the mac addusers
 elif [ "$UNAME" = "Darwin" ]; then
+    # Check to see if we're root.
     id -u ${USER} > /dev/null 2>&1
     if [ ! $? = 0 ]; then

-        # Creating for 10.5
- /usr/bin/sw_vers 2>/dev/null| grep "ProductVersion" | grep -E "10.5.|10.6" > /dev/null 2>&1
+        # Create for either 10.4 and earlier or 10.5 and above
+ /usr/bin/sw_vers 2>/dev/null| grep "ProductVersion" | grep -E "10.2|10.3.|10.4" > /dev/null 2>&1
         if [ $? = 0 ]; then
-            chmod +x ./init/osx105-addusers.sh
-            ./init/osx105-addusers.sh
-        else
             chmod +x ./init/darwin-addusers.pl
             ./init/darwin-addusers.pl
+        else
+            chmod +x ./init/osx105-addusers.sh
+            ./init/osx105-addusers.sh
+
         fi
     fi
 else



And for the server:
--- InstallServer.sh    2012-11-08 21:24:55.000000000 -0500
+++ InstallServer.sh.osx        2013-03-11 11:17:26.000000000 -0400
@@ -76,19 +76,21 @@
     /usr/sbin/useradd -d ${DIR} ${AIXSH} -g ${GROUP} ${USER_REM}
     fi

-# Thanks Chuck L. for the mac addusers
+# Thanks Chuck L. for the mac addusers
 elif [ "$UNAME" = "Darwin" ]; then
+    # Check to see if we're root.
     id -u ${USER} > /dev/null 2>&1
     if [ ! $? = 0 ]; then

-        # Creating for 10.5 and 10.6
- /usr/bin/sw_vers 2>/dev/null| grep "ProductVersion" | grep -E "10.5.|10.6" > /dev/null 2>&1
+        # Create for either 10.4 and earlier or 10.5 and above
+ /usr/bin/sw_vers 2>/dev/null| grep "ProductVersion" | grep -E "10.2|10.3.|10.4" > /dev/null 2>&1
         if [ $? = 0 ]; then
-            chmod +x ./init/osx105-addusers.sh
-            ./init/osx105-addusers.sh
-        else
             chmod +x ./init/darwin-addusers.pl
             ./init/darwin-addusers.pl
+        else
+            chmod +x ./init/osx105-addusers.sh
+            ./init/osx105-addusers.sh
+
         fi
     fi
 else



--
_______________________
bil hays
Infrastructure Manager
Computer Science, UNC CH
www.cs.unc.edu/~hays

--

--- You received this message because you are subscribed to the Google Groups "ossec-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to