macos: use pkgbuild to build the package on 10.10/10.11
[openafs.git] / src / packaging / MacOS / OpenAFS.post_install
index 72047bd..b9ef27b 100644 (file)
@@ -116,12 +116,23 @@ if [ $majorvers -ge 7 ]; then
   # make config/settings.plist if it doesn't exist
   if [ ! -e config/settings.plist -a -e config/settings.plist.orig ]; then
     cp config/settings.plist.orig config/settings.plist
+  else
+    /usr/libexec/PlistBuddy -c "Add :Darwin:All:FSEvents bool" config/settings.plist  && /usr/libexec/PlistBuddy -c "Set :Darwin:All:FSEvents true" config/settings.plist
   fi
 elif [ -e config/afssettings ]; then
   # turn off execution of afssettings
   chmod a-x config/afssettings
 fi
 
+# properly, we should acquire a certificate from a real CA and ship 
+# signed binaries. for now, make Application Firewall (Security prefs pane)
+# happy like this. See TN2206
+if [ $majorvers -lt 14 ]; then
+    if [ -f /usr/bin/codesign ]; then
+       codesign -s - /usr/sbin/afsd
+    fi
+fi
+
 #here we should run tools which configure the client, and then if it's enabled:
-#/Library/StartupItems/OpenAFS/OpenAFS start
+#start the new launchd daemon
 launchctl load -w /Library/LaunchDaemons/org.openafs.filesystems.afs.plist