openbsd-pkg-20030204
authorJim Rees <rees@umich.edu>
Tue, 4 Feb 2003 19:05:44 +0000 (19:05 +0000)
committerJim Rees <rees@umich.edu>
Tue, 4 Feb 2003 19:05:44 +0000 (19:05 +0000)
First cut at making an OpenBSD package.

src/packaging/OpenBSD/buildpkg.sh [new file with mode: 0644]
src/packaging/OpenBSD/desc [new file with mode: 0644]
src/packaging/OpenBSD/packinglist [new file with mode: 0644]
src/packaging/OpenBSD/postinstall [new file with mode: 0644]

diff --git a/src/packaging/OpenBSD/buildpkg.sh b/src/packaging/OpenBSD/buildpkg.sh
new file mode 100644 (file)
index 0000000..245bc12
--- /dev/null
@@ -0,0 +1,32 @@
+# $Id$
+
+SRC=../../../../..
+umask 022
+
+rm -rf usr
+mkdir -p usr/vice/bin usr/vice/etc usr/vice/cache
+chmod 700 usr/vice/cache
+
+ln -s \
+  $SRC/comerr/compile_et \
+  $SRC/venus/fs \
+  $SRC/kauth/kas \
+  $SRC/kauth/klog \
+  $SRC/sys/pagsh \
+  $SRC/ptserver/pts \
+  $SRC/log/tokens \
+  $SRC/log/unlog \
+  $SRC/volser/vos \
+  usr/vice/bin
+ln -s $SRC/pinstall/pinstall usr/vice/bin/install
+
+ln -s \
+  $SRC/afsd/afsd \
+  $SRC/libafs/MODLOAD/libafs.o \
+  ../../../postinstall \
+  usr/vice/etc
+ln -s $SRC/afsd/afs.rc.obsd usr/vice/etc/rc.securelevel.afs
+
+echo '/afs:/usr/vice/cache:96000' >usr/vice/etc/cacheinfo
+
+pkg_create -v -h -f packinglist -c -OpenAFS -d desc -p / -s $PWD openafs
diff --git a/src/packaging/OpenBSD/desc b/src/packaging/OpenBSD/desc
new file mode 100644 (file)
index 0000000..b5d65a7
--- /dev/null
@@ -0,0 +1 @@
+OpenAFS for OpenBSD 3.1
diff --git a/src/packaging/OpenBSD/packinglist b/src/packaging/OpenBSD/packinglist
new file mode 100644 (file)
index 0000000..730486f
--- /dev/null
@@ -0,0 +1,6 @@
+@owner root
+@group bin
+
+usr/vice
+
+@exec sh /usr/vice/etc/postinstall
diff --git a/src/packaging/OpenBSD/postinstall b/src/packaging/OpenBSD/postinstall
new file mode 100644 (file)
index 0000000..8680c10
--- /dev/null
@@ -0,0 +1,20 @@
+# $Id$
+
+umask 022
+if [ ! -d mkdir /afs ]; then
+  mkdir /afs
+fi
+
+echo "Fetching CellServDB..."
+ftp -o /usr/vice/etc/CellServDB http://grand.central.org/dl/cellservdb/CellServDB
+
+echo -n 'Please enter your cell name: '
+sh -c 'read; echo $REPLY >/usr/vice/etc/ThisCell'
+echo 'Reboot to start OpenAFS.'
+
+if ! grep -q '^\. /usr/vice/etc/rc.securelevel.afs' /etc/rc.securelevel; then
+  echo 'adding rc.securelevel.afs to /etc/rc.securelevel'
+  echo '. /usr/vice/etc/rc.securelevel.afs' >>/etc/rc.securelevel
+else
+  echo 'rc.securelevel.afs is already in /etc/rc.securelevel'
+fi