[Dextrose] [OOB PATCH] uy#1769: OOB changes, to set up "WebDAV" share, running in the context of "httpd" service.

Ajay Garg ajay at activitycentral.com
Thu Apr 26 17:56:52 EDT 2012


diff --git a/config/dextrose3-common.ini b/config/dextrose3-common.ini
index 02b67f7..e5236a6 100644
--- a/config/dextrose3-common.ini
+++ b/config/dextrose3-common.ini
@@ -40,6 +40,8 @@ dx3_common_packages_add=
 	telepathy-idle,
 	telepathy-sofiasip,
 	x11vnc,
+	httpd,
+	chkconfig,
 
 ; accessibility packages
 ; Already added as dependencies for sugar-control-accessibility
diff --git a/modules/base/kspost.10.core.inc b/modules/base/kspost.10.core.inc
index 98d374a..43611f6 100644
--- a/modules/base/kspost.10.core.inc
+++ b/modules/base/kspost.10.core.inc
@@ -215,3 +215,44 @@ echo "keycode 224 = F13" >> $filename
 filename="/usr/share/X11/xkb/keycodes/evdev"
 SearchAndDeleteLineContainingRegex $filename " *<LWIN> = 133; *"
 SearchAndReplaceRegex $filename "<CAPS> = 66;" "<CAPS> = 133;"
+
+# uy#1769 : Set up "httpd", to host "WebDAV" shares.
+filename="/etc/httpd/conf/httpd.conf"
+SearchAndReplaceRegex $filename "#<VirtualHost \*:80>" "<VirtualHost \*:80>"
+SearchAndDeleteLineContainingRegex $filename "#<\/VirtualHost>"
+
+mkdir -p /var/www/web1/web
+mkdir -p /var/www/web1/web/.Sugar-Metadata
+
+rm /etc/httpd/logs
+mkdir /etc/httpd/logs
+
+cat << EOF >> /etc/httpd/conf/httpd.conf
+        DocumentRoot /var/www/web1/web/
+        <Directory /var/www/web1/web/>
+                Options Indexes MultiViews
+                AllowOverride None
+                Order allow,deny
+                allow from all
+        </Directory>
+
+        Alias /webdav /var/www/web1/web
+
+        <Location /webdav>
+            DAV On
+            AuthType Basic
+            AuthName "webdav"
+            AuthUserFile /var/www/web1/passwd.dav
+            Require valid-user
+        </Location>
+</VirtualHost>
+
+EOF
+
+
+chmod -R 0777 /var/www/web1/web
+chmod -R 0777 /var/www/web1/web/.Sugar-Metadata
+htpasswd -bc /var/www/web1/passwd.dav test olpc
+/sbin/chkconfig httpd --levels 5 on
+
+# uy#1769 customizations end.
-- 
1.7.4.4



More information about the Dextrose mailing list