You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/07/13 17:50:42 UTC

svn commit: r556043 - /spamassassin/trunk/build/buildbot/etc-init.d-tmpfs

Author: jm
Date: Fri Jul 13 08:50:42 2007
New Revision: 556043

URL: http://svn.apache.org/viewvc?view=rev&rev=556043
Log:
missed checking in an essential script

Added:
    spamassassin/trunk/build/buildbot/etc-init.d-tmpfs

Added: spamassassin/trunk/build/buildbot/etc-init.d-tmpfs
URL: http://svn.apache.org/viewvc/spamassassin/trunk/build/buildbot/etc-init.d-tmpfs?view=auto&rev=556043
==============================================================================
--- spamassassin/trunk/build/buildbot/etc-init.d-tmpfs (added)
+++ spamassassin/trunk/build/buildbot/etc-init.d-tmpfs Fri Jul 13 08:50:42 2007
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# must have a link at /etc/rc3.d/S70tmpfs
+
+. /etc/profile
+
+start() {
+    echo "Mounting tmpfs: "
+    [ -d /export/home/bbmass/tmpfs ] || mkdir -p /export/home/bbmass/tmpfs
+    mount -F tmpfs swap /export/home/bbmass/tmpfs
+    rm -f /tmpfs
+    ln -s /export/home/bbmass/tmpfs /tmpfs
+
+    chmod 1777 /export/home/bbmass/tmpfs
+    mkdir /tmpfs/aicache
+    chmod 1777 /tmpfs/aicache
+    echo "Done."
+}
+
+stop() {
+    umount /export/home/bbmass/tmpfs
+    chmod 0700 /export/home/bbmass/tmpfs
+}
+
+case "$1" in
+        start)
+            start
+            ;;
+
+        stop)
+            stop
+            ;;
+
+        restart)
+            stop; sleep 2; start
+            ;;
+
+        *)
+            echo $"Usage: $0 {start|stop|restart|condrestart}"
+            exit 1
+
+esac
+
+exit 0
+