[Xquartz-changes] [646] trunk/pkg/scripts/postinst_sl.sh

source_changes at macosforge.org source_changes at macosforge.org
Fri Aug 3 10:51:23 PDT 2012


Revision: 646
          http://trac.macosforge.org/projects/xquartz/changeset/646
Author:   jeremyhu at freedesktop.org
Date:     2012-08-03 10:51:23 -0700 (Fri, 03 Aug 2012)
Log Message:
-----------
Set XAuthLocation in /etc/ssh_config and /etc/sshd_config

Modified Paths:
--------------
    trunk/pkg/scripts/postinst_sl.sh

Modified: trunk/pkg/scripts/postinst_sl.sh
===================================================================
--- trunk/pkg/scripts/postinst_sl.sh	2012-08-03 17:40:18 UTC (rev 645)
+++ trunk/pkg/scripts/postinst_sl.sh	2012-08-03 17:51:23 UTC (rev 646)
@@ -1,8 +1,25 @@
 #!/bin/sh
 
-[[ -f /etc/paths.d/XQuartz ]] && rm /etc/paths.d/XQuartz 
-[[ -f /etc/manpaths.d/XQuartz ]] && rm /etc/manpaths.d/XQuartz 
+if ! cat /etc/sshd_config | grep -v '^#' | grep -q XAuthLocation ; then
+    {
+        echo ""
+        echo "# XAuthLocation added by XQuartz (http://xquartz.macosforge.org)"
+        echo "XAuthLocation /opt/X11/bin/xauth"
+    } >> /etc/sshd_config
+fi
 
+if ! cat /etc/ssh_config | grep -v '^#' | grep -q XAuthLocation ; then
+    {
+        echo ""
+        echo "# XAuthLocation added by XQuartz (http://xquartz.macosforge.org)"
+        echo "Host *"
+        echo "    XAuthLocation /opt/X11/bin/xauth"
+    } >> /etc/ssh_config
+fi
+
+[[ -f /etc/paths.d/XQuartz ]] && rm /etc/paths.d/XQuartz
+[[ -f /etc/manpaths.d/XQuartz ]] && rm /etc/manpaths.d/XQuartz
+
 [[ -d /opt/X11/include/libpng12 ]] && rm -rf /opt/X11/include/libpng12
 [[ -f /opt/X11/bin/libpng12-config ]] && rm /opt/X11/bin/libpng12-config
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20120803/51dae18c/attachment.html>


More information about the Xquartz-changes mailing list