solaris8-fixes-20001114
authorChas Williams <chas@cmf.nrl.navy.mil>
Wed, 15 Nov 2000 00:38:24 +0000 (00:38 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 15 Nov 2000 00:38:24 +0000 (00:38 +0000)
updates to solaris 8

src/afs/SOLARIS/osi_vfsops.c
src/afsd/afs.rc.solaris.2.8 [new file with mode: 0755]
src/config/param.sun4x_58.h
src/config/param.sun4x_58_usr.h

index 343df6d..40d7250 100644 (file)
@@ -54,7 +54,11 @@ int afs_mount(struct vfs *afsp, struct vnode *amvp, struct mounta *uap,
     return 0;
 }
 
+#if defined(AFS_SUN58_ENV)
+int afs_unmount (struct vfs *afsp, int flag, struct AFS_UCRED *credp)
+#else
 int afs_unmount (struct vfs *afsp, struct AFS_UCRED *credp)
+#endif
 {
     AFS_GLOCK();
     AFS_STATCNT(afs_unmount);
@@ -217,7 +221,10 @@ struct vfsops Afs_vfsops = {
     afs_sync,
     afs_vget,
     afs_mountroot,
-    afs_swapvp
+    afs_swapvp,
+#if defined(AFS_SUN58_ENV)
+    fs_freevfs,
+#endif
 };
 
 
diff --git a/src/afsd/afs.rc.solaris.2.8 b/src/afsd/afs.rc.solaris.2.8
new file mode 100755 (executable)
index 0000000..64e089f
--- /dev/null
@@ -0,0 +1,188 @@
+#!/bin/sh
+#
+# afs.rc: rc script for AFS on Solaris 2.x platforms
+#
+# Install this script as /etc/init.d/afs.rc
+# then make links like this:
+# ln -s ../init.d/afs.rc /etc/rc0.d/K66afs
+# ln -s ../init.d/afs.rc /etc/rc3.d/S99afs 
+#
+CONFIG=/usr/vice/etc/config
+AFSDOPT=$CONFIG/afsd.options
+PACKAGE=$CONFIG/package.options
+
+LARGE="-stat 2800 -dcache 2400 -daemons 5 -volumes 128"
+MEDIUM="-stat 2000 -dcache 800 -daemons 3 -volumes 70"
+SMALL="-stat 300 -dcache 100 -daemons 2 -volumes 50"
+
+if [ -f $AFSDOPT ]; then
+    OPTIONS=`cat $AFSDOPT`
+else
+    OPTIONS=$MEDIUM
+fi
+
+# Need the commands ps, awk, kill, sleep
+PATH=${PATH}${PATH:+:}/sbin:/bin:/usr/bin
+
+killproc() {            # kill the named process(es)
+      awkfield2='$2'
+        pid=`ps -ef | awk "/$1/ && ! /awk/ {print $awkfield2}"`
+        [ "$pid" != "" ] && kill -KILL $pid
+}
+
+case $1 in
+'start')
+
+#
+# Make sure afs exists in /etc/name_to_sysnum
+#
+if grep -s "afs" /etc/name_to_sysnum > /dev/null; then
+    echo "Entry for afs already exists in /etc/name_to_sysnum"
+else
+    echo "Creating entry for afs in /etc/name_to_sysnum"
+    cp /etc/name_to_sysnum /etc/name_to_sysnum.orig
+    sed '/nfs/i\
+afs                    65' /etc/name_to_sysnum > /tmp/name_to_sysnum
+    mv /tmp/name_to_sysnum /etc/name_to_sysnum
+    echo "Rebooting now for new /etc/name_to_sysnum to take effect"
+    reboot
+fi
+
+## Check to see that /bin/isalist exists and is executable
+if [ ! -x /bin/isalist ] ;then
+      echo "/bin/isalist not executable"
+      exit 1;
+fi
+
+## Determine if we are running the 64 bit OS
+## If sparcv9 then the location of the afs and nfs extensions differ
+
+case `/bin/isalist` in
+    *sparcv9* )
+              nfssrv=/kernel/misc/sparcv9/nfssrv
+              afs=/kernel/fs/sparcv9/afs ;;
+          * )
+              nfssrv=/kernel/misc/nfssrv
+              afs=/kernel/fs/afs ;;
+esac
+
+
+#
+# Load kernel extensions
+#
+# nfssrv has to be loaded first
+
+
+if [ -f $nfssrv ]; then
+      echo "Loading NFS server kernel extensions"
+      modload $nfssrv
+else
+      echo "$nfssrv does not exist. Skipping AFS startup."
+      exit 1
+fi
+
+## Load AFS kernel extensions
+
+if [ -f $afs ]; then
+      echo "Loading AFS kernel extensions"
+      modload $afs
+else
+      echo "$afs does not exist. Skipping AFS startup."
+      exit 1
+fi
+
+#
+# Start the AFS server processes if a bosserver exists
+#
+
+if [ -x /usr/afs/bin/bosserver ]; then
+      echo "Starting AFS Server processes"
+      /usr/afs/bin/bosserver &
+      OPTIONS="$OPTIONS -nosettime"
+      sleep 30
+fi
+
+#
+# Check that all of the client configuration files exist
+#
+
+for file in /usr/vice/etc/afsd /usr/vice/etc/cacheinfo \
+          /usr/vice/etc/ThisCell /usr/vice/etc/CellServDB
+do
+      if [ ! -f ${file} ]; then
+              echo "${file} does not exist. Not starting AFS client."
+              exit 1
+      fi
+done
+
+#
+# Check that the root directory for AFS (/afs) 
+# and the cache directory (/usr/vice/cache) both exist
+#
+
+for dir in `awk -F: '{print $1, $2}' /usr/vice/etc/cacheinfo`
+do
+      if [ ! -d ${dir} ]; then
+              echo "${dir} does not exist. Not starting AFS client."
+              exit 2
+      fi
+done
+
+echo "Starting afsd"
+/usr/vice/etc/afsd $OPTIONS
+
+#
+# Run package to update the disk
+#
+if [ -f /usr/afsws/etc/package -a -f $PACKAGE ]; then
+      /usr/afsws/etc/package -v -o `cat $PACKAGE` > /dev/console 2>&1
+case $? in
+0)
+      (echo "Package completed successfully") > /dev/console 2>&1
+      date > /dev/console 2>&1
+      ;;
+4)
+      (echo "Rebooting to restart system") > /dev/console 2>&1
+      sync
+      /etc/reboot
+      ;;
+*)
+      (echo "Package update failed; continuing") > /dev/console 2>&1
+      ;;
+esac
+fi
+
+#
+# Start AFS inetd services
+# (See the AFS Command Ref. for notes on the proper configuration of inetd.afs)
+#
+if [ -f /usr/sbin/inetd.afs -a -f /etc/inetd.conf.afs ]; then
+      /usr/sbin/inetd.afs /etc/inetd.conf.afs
+fi
+
+echo ;;
+
+'stop')
+
+#
+# Stop the AFS inetd and server processes
+# Note that the afsd processes cannot be killed
+#
+
+echo "Killing inetd.afs"
+killproc inetd.afs
+
+bosrunning=`ps -ef | awk '/bosserver/ && ! /awk/'`
+if [ "${bosrunning}" != "" ]; then
+      echo "Shutting down AFS server processes"
+      /usr/afs/bin/bos shutdown localhost -localauth -wait
+      echo "Killing AFS bosserver"
+      killproc bosserver
+fi
+
+echo ;;
+
+*)    echo "Invalid option supplied to $0"
+      exit 1;;
+esac
index 7326e4f..b818510 100644 (file)
@@ -26,7 +26,7 @@
 #define AFS_GCPAGS             1       /* if nonzero, garbage collect PAGs */
 
 #define        AFS_3DISPARES           1       /* Utilize the 3 available disk inode 'spares' */
-#define        AFS_SYSCALL             101
+#define        AFS_SYSCALL             65
 
 /* File system entry (used if mount.h doesn't define MOUNT_AFS */
 #define AFS_MOUNT_AFS   "afs"
index e6c08d3..9de7672 100644 (file)
@@ -20,7 +20,7 @@
 /*#define AFS_GLOBAL_SUNLOCK   1       /* For global locking */
 
 #define        AFS_3DISPARES           1       /* Utilize the 3 available disk inode 'spares' */
-#define        AFS_SYSCALL             101
+#define        AFS_SYSCALL             65
 
 /* File system entry (used if mount.h doesn't define MOUNT_AFS */
 #define AFS_MOUNT_AFS   1