]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
* Detect AFS caches on non-ext2/ext3 file systems and abort AFS client
authorRuss Allbery <rra@debian.org>
Fri, 19 Aug 2005 00:37:34 +0000 (00:37 +0000)
committerRuss Allbery <rra@debian.org>
Fri, 19 Aug 2005 00:37:34 +0000 (00:37 +0000)
    initialization.  (Closes: #249315)

debian/changelog
debian/openafs-client.init

index 8cdb4d293983be71eaf5f7fc86dc184b8acf69c4..5e81cf8f8471dd2fedb575e92e0790c59c636c5c 100644 (file)
@@ -5,6 +5,8 @@ openafs (1.3.87-2) unstable; urgency=low
     dynroot.  afs-newcell generates the server CellServDB directly to work
     around oddities with bos addhost.  Thanks to Fahemm Mitha and Sergio
     Gelato for analysis and patches.  (Closes: #322638)
+  * Detect AFS caches on non-ext2/ext3 file systems and abort AFS client
+    initialization.  (Closes: #249315)
   * Redo how library object files are found for the PAM module build to
     avoid assuming C locale character set behavior.  (Closes: #323582)
   * Remove the openafs-client warning against dynroot for the first system
index a271fbfce85e54015694c0488b56d6ba99450246..ce8caad881e98b4e58f1512dae08ca550ef9f0ba 100755 (executable)
@@ -121,6 +121,21 @@ choose_afsd_options() {
     fi
 }
 
+# Make sure that the cache file system type is ext2 or ext3.  No other file
+# system is supported for the cache, and generally bad things happen if a
+# different one is used.
+check_cache_fstype() {
+    CACHEPATH=`awk -F: '{print $2}' < /etc/openafs/cacheinfo`
+    FSTYPE=`stat -f -c '%T' "$CACHEPATH"`
+    if [ x"$FSTYPE" != x"ext2/ext3" ] ; then
+        echo ""
+        echo "ERROR: AFS cache at $CACHEPATH is on a $FSTYPE file system" >&2
+        echo "ERROR: Only ext2 or ext3 may be used for an AFS cache" >&2
+        echo "Aborting startup of AFS" >&2
+        exit 1
+    fi
+}
+
 # Start afsd.  Be careful not to start it if another one is already running,
 # as that has a bad tendency to hang the system.
 start_client() {
@@ -128,6 +143,7 @@ start_client() {
         echo "."
     else
         choose_afsd_options
+        check_cache_fstype
         echo " afsd."
         start-stop-daemon --start --quiet --exec /usr/sbin/afsd \
             -- $AFSD_OPTIONS