summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-fs/shfs/files')
-rw-r--r--net-fs/shfs/files/amd.conf35
-rw-r--r--net-fs/shfs/files/amd.shfs1
-rw-r--r--net-fs/shfs/files/digest-shfs-0.311
-rw-r--r--net-fs/shfs/files/shfs-gentoo-0.31-makefile-root.diff19
-rw-r--r--net-fs/shfs/files/shfs-gentoo-0.31-ppc.diff19
-rw-r--r--net-fs/shfs/files/shfs.mount61
6 files changed, 136 insertions, 0 deletions
diff --git a/net-fs/shfs/files/amd.conf b/net-fs/shfs/files/amd.conf
new file mode 100644
index 000000000000..65ccb242f0a7
--- /dev/null
+++ b/net-fs/shfs/files/amd.conf
@@ -0,0 +1,35 @@
+#
+# amd default config file
+#
+# check amd.conf(5) man page for details about options in this file
+#
+# $Id: amd.conf,v 1.1 2003/06/03 07:38:29 absinthe Exp $
+
+# GLOBAL OPTIONS SECTION
+[ global ]
+normalize_hostnames = no
+print_pid = yes
+pid_file = /var/run/amd.pid
+restart_mounts = yes
+auto_dir = /.automount
+log_file = syslog
+log_options = all
+plock = no
+selectors_on_default = yes
+print_version = no
+map_type = file
+search_path = /etc/amd
+browsable_dirs = no
+show_statfs_entries = no
+fully_qualified_hosts = no
+cache_duration = 300
+
+# DEFINE AN AMD MOUNT POINT
+[ /net ]
+map_name = amd.net
+map_type = file
+
+# SHFS: AUTO ADDED
+[ /shfs ]
+map_name = /etc/amd/amd.shfs
+# SHFS: END
diff --git a/net-fs/shfs/files/amd.shfs b/net-fs/shfs/files/amd.shfs
new file mode 100644
index 000000000000..3b150a84980f
--- /dev/null
+++ b/net-fs/shfs/files/amd.shfs
@@ -0,0 +1 @@
+* type:=program;fs:=${autodir}/${rhost}${rfs};mount:="/etc/amd/shfs.mount mount ${uid} ${key} ${fs}";unmount:="/etc/amd/shfs.umount umount ${fs}"
diff --git a/net-fs/shfs/files/digest-shfs-0.31 b/net-fs/shfs/files/digest-shfs-0.31
new file mode 100644
index 000000000000..c69b1f0e222b
--- /dev/null
+++ b/net-fs/shfs/files/digest-shfs-0.31
@@ -0,0 +1 @@
+MD5 61d7ed5faaf5d98381fd18b103f58359 shfs-0.31-1.tar.gz 71010
diff --git a/net-fs/shfs/files/shfs-gentoo-0.31-makefile-root.diff b/net-fs/shfs/files/shfs-gentoo-0.31-makefile-root.diff
new file mode 100644
index 000000000000..b01fecc3d7d4
--- /dev/null
+++ b/net-fs/shfs/files/shfs-gentoo-0.31-makefile-root.diff
@@ -0,0 +1,19 @@
+diff -ur shfs-0.31-1/Makefile shfs-0.31-1.orig/Makefile
+--- shfs-0.31-1.orig/Makefile 2003-06-01 16:31:17.000000000 -0500
++++ shfs-0.31-1/Makefile 2003-06-01 18:03:09.000000000 -0500
+@@ -1,5 +1,5 @@
+ # for making packages
+-ROOT=/
++ROOT=${D}
+ # where to install modules
+ MODULESDIR=${ROOT}/lib/modules/$(shell uname -r)
+ # kernel source tree
+@@ -7,7 +7,7 @@
+ # use modversions?
+ MODVERSIONS=yes
+ # leave empty if you don't need amd support
+-AMD_CONF_DIR=/etc/am-utils/
++# AMD_CONF_DIR=/etc/am-utils/
+ # leave empty if you don't need man pages installed
+ MAN_PAGE_DIR=
+ # leave empty if you don't need html manual
diff --git a/net-fs/shfs/files/shfs-gentoo-0.31-ppc.diff b/net-fs/shfs/files/shfs-gentoo-0.31-ppc.diff
new file mode 100644
index 000000000000..5d7b84694ee0
--- /dev/null
+++ b/net-fs/shfs/files/shfs-gentoo-0.31-ppc.diff
@@ -0,0 +1,19 @@
+*** /var/tmp/portage/shfs-0.31/work/shfs-0.31-1.orig/shfs/Makefile Sun Jun 1 23:47:27 2003
+--- /var/tmp/portage/shfs-0.31/work/shfs-0.31-1/shfs/Makefile Sun Jun 1 23:47:58 2003
+*************** SEARCHDIRS := -I- -I. -I${KERNEL_SOURCES
+*** 17,23 ****
+ CC := gcc
+ CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX -DDEBUG_LEVEL=${DEBUG}
+ LINKER := ld
+! LDFLAGS = -m elf_i386 -r
+ LOADLIBES :=
+
+ all: ${ALL_TARGETS}
+--- 17,23 ----
+ CC := gcc
+ CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX -DDEBUG_LEVEL=${DEBUG}
+ LINKER := ld
+! LDFLAGS = -m elf32ppclinux -r
+ LOADLIBES :=
+
+ all: ${ALL_TARGETS}
diff --git a/net-fs/shfs/files/shfs.mount b/net-fs/shfs/files/shfs.mount
new file mode 100644
index 000000000000..e9be033da164
--- /dev/null
+++ b/net-fs/shfs/files/shfs.mount
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# This amd automounter script is called when remote host should be
+# (un)mounted under /shfs directory. Feel free to modify this script
+# to satisfy your needs (e.g add special options to shfsmount,
+# restrict mount to some users, etc.).
+#
+# mount user-id key dir
+# umount dir
+
+umask 022
+
+case `basename $0` in
+ "mount")
+ ID="$1"; KEY="$2"; DIR="$3"
+ if [ -z "$ID" -o -z "$KEY" -o -z "$DIR" ]; then
+ echo "Invalid usage."
+ exit 2
+ fi
+
+ RUSER=`echo "$KEY" | cut -d"%" -f1`
+ RHOST=`echo "$KEY" | cut -d"%" -f2-`
+
+ SSH_AGENT_PID=`ps -C ssh-agent -opid=,uid= | sed -n "s/^[ \t]\{1,\}\([0-9]\{1,\}\)\{1,\}[ \t]\{1,\}$ID\$/\1/p" | tail -1`
+ SSH_AUTH_SOCK=`find /tmp -follow -maxdepth 4 -type s -user "$ID" | grep ssh | grep agent | tail -1`
+
+ if [ ! -z "$SSH_AGENT_PID" -a ! -z "$SSH_AUTH_SOCK" ]; then
+ export SSH_AGENT_PID SSH_AUTH_SOCK
+ fi
+
+ IDG=`grep "^[^:]*:[^:]*:$ID:.*$" /etc/passwd | cut -d":" -f4`
+
+ mkdir -p $DIR
+ shfsmount -u "$ID" -O "-o BatchMode=yes" "$RUSER@$RHOST" "$DIR" -o uid="$ID",gid="$IDG" >/dev/null 2>&1
+
+ if [ $? -ne 0 ]; then
+ rmdir $DIR
+ exit 2
+ else
+ exit 0
+ fi
+ ;;
+
+ umount)
+ DIR="$1"
+ if [ -z "$DIR" ]; then
+ echo "Invalid usage."
+ exit 2
+ fi
+
+ if umount "$DIR" >/dev/null 2>&1; then
+ rmdir "$DIR" >/dev/null 2>&1
+ exit 0;
+ fi
+ exit 2
+ ;;
+
+ *)
+ echo "Invalid usage."
+ exit 2
+esac