From: Paul Weber Date: Thu, 19 Jun 2003 23:03:29 +0000 (+0000) Subject: hpux-packagings-20030619 X-Git-Tag: openafs-devel-1_3_50~168 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4b2f1af543680039c791242d5bd594a3cd3061f0;p=packages%2Fo%2Fopenafs.git hpux-packagings-20030619 FIXES 1315 updated packaging for hp-ux 11.00, 11.11 and 11.22 --- diff --git a/src/packaging/HP-UX/data/depot.copyright b/src/packaging/HP-UX/data/depot.copyright new file mode 100644 index 000000000..86acd67f3 --- /dev/null +++ b/src/packaging/HP-UX/data/depot.copyright @@ -0,0 +1,3 @@ + +This is the depot copyright. + diff --git a/src/packaging/HP-UX/data/depot.description b/src/packaging/HP-UX/data/depot.description new file mode 100644 index 000000000..9e818f75b --- /dev/null +++ b/src/packaging/HP-UX/data/depot.description @@ -0,0 +1,3 @@ + +This is the depot description. + diff --git a/src/packaging/HP-UX/data/fileset.description b/src/packaging/HP-UX/data/fileset.description new file mode 100644 index 000000000..f214b57db --- /dev/null +++ b/src/packaging/HP-UX/data/fileset.description @@ -0,0 +1,8 @@ + +This softare is given freely and is totally unsupported by HP. There are +no warranties expressed or implied. Installation and use are solely at the +risk of the installer and user. + +Paul Weber +Hewlett-Packard Consulting + diff --git a/src/packaging/HP-UX/data/openafs-clnt.description b/src/packaging/HP-UX/data/openafs-clnt.description new file mode 100644 index 000000000..f214b57db --- /dev/null +++ b/src/packaging/HP-UX/data/openafs-clnt.description @@ -0,0 +1,8 @@ + +This softare is given freely and is totally unsupported by HP. There are +no warranties expressed or implied. Installation and use are solely at the +risk of the installer and user. + +Paul Weber +Hewlett-Packard Consulting + diff --git a/src/packaging/HP-UX/data/openafs-krn.description b/src/packaging/HP-UX/data/openafs-krn.description new file mode 100644 index 000000000..f214b57db --- /dev/null +++ b/src/packaging/HP-UX/data/openafs-krn.description @@ -0,0 +1,8 @@ + +This softare is given freely and is totally unsupported by HP. There are +no warranties expressed or implied. Installation and use are solely at the +risk of the installer and user. + +Paul Weber +Hewlett-Packard Consulting + diff --git a/src/packaging/HP-UX/data/openafs-run.description b/src/packaging/HP-UX/data/openafs-run.description new file mode 100644 index 000000000..f214b57db --- /dev/null +++ b/src/packaging/HP-UX/data/openafs-run.description @@ -0,0 +1,8 @@ + +This softare is given freely and is totally unsupported by HP. There are +no warranties expressed or implied. Installation and use are solely at the +risk of the installer and user. + +Paul Weber +Hewlett-Packard Consulting + diff --git a/src/packaging/HP-UX/data/openafs-srv.description b/src/packaging/HP-UX/data/openafs-srv.description new file mode 100644 index 000000000..f214b57db --- /dev/null +++ b/src/packaging/HP-UX/data/openafs-srv.description @@ -0,0 +1,8 @@ + +This softare is given freely and is totally unsupported by HP. There are +no warranties expressed or implied. Installation and use are solely at the +risk of the installer and user. + +Paul Weber +Hewlett-Packard Consulting + diff --git a/src/packaging/HP-UX/data/product.README b/src/packaging/HP-UX/data/product.README new file mode 100644 index 000000000..b860888c7 --- /dev/null +++ b/src/packaging/HP-UX/data/product.README @@ -0,0 +1,6 @@ + +This softare is given freely and is totally unsupported by HP. There are +no warranties expressed or implied. Installation and use are solely at the +risk of the installer or user. + + diff --git a/src/packaging/HP-UX/data/product.copyright b/src/packaging/HP-UX/data/product.copyright new file mode 100644 index 000000000..684cc507d --- /dev/null +++ b/src/packaging/HP-UX/data/product.copyright @@ -0,0 +1,3 @@ + +This is the copyright + diff --git a/src/packaging/HP-UX/data/product.description b/src/packaging/HP-UX/data/product.description new file mode 100644 index 000000000..b860888c7 --- /dev/null +++ b/src/packaging/HP-UX/data/product.description @@ -0,0 +1,6 @@ + +This softare is given freely and is totally unsupported by HP. There are +no warranties expressed or implied. Installation and use are solely at the +risk of the installer or user. + + diff --git a/src/packaging/HP-UX/data/subproduct.description b/src/packaging/HP-UX/data/subproduct.description new file mode 100644 index 000000000..f214b57db --- /dev/null +++ b/src/packaging/HP-UX/data/subproduct.description @@ -0,0 +1,8 @@ + +This softare is given freely and is totally unsupported by HP. There are +no warranties expressed or implied. Installation and use are solely at the +risk of the installer and user. + +Paul Weber +Hewlett-Packard Consulting + diff --git a/src/packaging/HP-UX/data/vendor.description b/src/packaging/HP-UX/data/vendor.description new file mode 100644 index 000000000..8d1ec2848 --- /dev/null +++ b/src/packaging/HP-UX/data/vendor.description @@ -0,0 +1,3 @@ + +This is the vendor description. + diff --git a/src/packaging/HP-UX/files/usr/vice/etc/CellServDB b/src/packaging/HP-UX/files/usr/vice/etc/CellServDB new file mode 100644 index 000000000..ab3d37ba0 --- /dev/null +++ b/src/packaging/HP-UX/files/usr/vice/etc/CellServDB @@ -0,0 +1,40 @@ +>andrew.cmu.edu #Carnegie Mellon University - Computing Services +128.2.10.11 #vice11.fs.andrew.cmu.edu +128.2.10.12 #vice12.fs.andrew.cmu.edu +128.2.10.2 #vice2.fs.andrew.cmu.edu +128.2.10.28 #vice28.fs.andrew.cmu.edu +128.2.10.7 #vice7.fs.andrew.cmu.edu +>cs.cmu.edu #Carnegie Mellon University - School of Comp. Sci. +128.2.206.130 #cucumber.srv.cs.cmu.edu +128.2.222.199 #papaya.srv.cs.cmu.edu +128.2.242.86 #lemon.srv.cs.cmu.edu +>ece.cmu.edu #Carnegie Mellon University - Elec. Comp. Eng. Dept. +128.2.129.7 #porok.ece.cmu.edu +128.2.129.8 #vicio.ece.cmu.edu +128.2.129.9 #e-xing.ece.cmu.edu +>athena.mit.edu #MIT/Athena cell +18.70.0.6 #prill.mit.edu. +18.145.0.25 #agamemnon.mit.edu. +18.159.0.34 #chimera.mit.edu. +>dev.mit.edu #MIT/IS Development cell +18.86.0.28 #wham.mit.edu. +18.86.0.50 #hum.mit.edu. +18.86.0.51 #rattle.mit.edu. +>net.mit.edu #MIT/Network Group cell +18.72.1.38 #gracie.mit.edu. +18.72.0.26 #cetus.mit.edu. +>sipb.mit.edu #MIT/SIPB cell +18.181.0.19 #reynelda.mit.edu. +18.181.0.23 #ronald-ann.mit.edu. +18.181.0.22 #rosebud.mit.edu. +>ir.stanford.edu #Stanford University +171.64.7.222 #afsdb1.stanford.edu +171.64.7.234 #afsdb2.stanford.edu +171.64.7.246 #afsdb3.stanford.edu +>umr.edu #University of Missouri - Rolla +131.151.1.59 #afs1.umr.edu +131.151.1.70 #afs6.umr.edu +131.151.1.146 #afs5.umr.edu +>dementia.org #Dementia Unlimited +128.2.35.149 #alycia.dementia.org +128.2.120.216 #meredith.dementia.org diff --git a/src/packaging/HP-UX/files/usr/vice/etc/SuidCells b/src/packaging/HP-UX/files/usr/vice/etc/SuidCells new file mode 100644 index 000000000..98fdd73f2 --- /dev/null +++ b/src/packaging/HP-UX/files/usr/vice/etc/SuidCells @@ -0,0 +1,5 @@ +athena.mit.edu +net.mit.edu +sipb.mit.edu +dev.mit.edu +ops.mit.edu diff --git a/src/packaging/HP-UX/files/usr/vice/etc/cacheinfo b/src/packaging/HP-UX/files/usr/vice/etc/cacheinfo new file mode 100644 index 000000000..dd0fd05cb --- /dev/null +++ b/src/packaging/HP-UX/files/usr/vice/etc/cacheinfo @@ -0,0 +1 @@ +/afs:/usr/vice/cache:100000 diff --git a/src/packaging/HP-UX/psf-1.2.10-transarc-paths-11.00 b/src/packaging/HP-UX/psf-1.2.10-transarc-paths-11.00 new file mode 100644 index 000000000..21c3eda3d --- /dev/null +++ b/src/packaging/HP-UX/psf-1.2.10-transarc-paths-11.00 @@ -0,0 +1,590 @@ +# File: psf-1.2.10 +# +# Purpose: OpenAFS Product Specification File (PSF) for swpackage +# +# Copyright: Copyright (c) 2003 +# +# Header: $Header$ +# +# Description: This PSF contains a valid product definition which includes +# all attributes for OpenAFS installation via software Distributor +# +# +# Not all control scripts are required for installation of a product/fileset +# +# Below is the list of control scripts that can be used on either +# Products or filesets + # Control script definition(s): + # + # Control scripts are optional. If defined, then specify the + # path to the script file. + # + # NOTE: control scripts can be defined for products too. + + #checkinstall path # Install check script + #preinstall path # Install pre-load script + #postinstall path # Install post-load script + #configure path # Configure for use script + #unconfigure path # Configure undo script + #verify path # Verify integrity script + #checkremove path # Remove check script + #preremove path # Remove pre-remove script + #postremove path # Remove post-remove script + #control_file path # Addition (sub)script or control data + + + vendor + + tag "OpenSource" # The identifier for the vendor. + title "OpenSource Software" # The name of the vendor. +# uuid "" # The NetLs UUID for the vendor. + description < data/vendor.description # A multi-line description of the vendor. + + end #Vendor + + # Product definition(s): + # + # All product attributes are optional, except for the tag and the + # filesets which must be contained within it. + + product + + tag "OPENAFS" # The identifier for the product. + title "Open Source Andrews File System" # The name of the product. + revision "A.1.2.10" # The revision (release) number of the product. + + #number "the_number" # The order/part number for the product. + category "OpenSource"" # The type of software (identifier). + #category_title "the category title" # The type of software (string). + + description < data/product.description # A file containing a + #multi-line description of the product. + + copyright "(c)Copyright 2002 OpenAFS, All Rights Reserved." + + readme < data/product.README # A multi-page README for the product. + + + architecture HP-UX_B.11.00_32/64 # A concise summary of hardware/OS'es + #supported. + + machine_type *:32* # Machines the product supports (uname -m). + os_name HP-UX # OS'es the product supports (uname -s). + os_release ?.11.00 # OS releases the product supports (uname -r). + os_version * # OS versions the product supports (uname -v). + + directory /usr/afs # The root directory for the product + is_locatable false # If defined then users can install the product + # into any directory they specify. + + # Control script definition(s): + # + # Control scripts are optional. If defined, then specify the + # path to the script file. + # + # NOTE: control scripts can be defined for products or filesets + + configure scripts/openafs.configure + unconfigure scripts/openafs.unconfigure + + # Subproduct definition(s): + # + # Subproducts are optional. If defined, then they group/partition + # the product's filesets into logical sets. If defined, then the + # tag and contents are required. + # + # The Runtime subproduct contains anything that is pertinant to + # either the server or client products + # + # + subproduct + tag Runtime + title "Rutime Requirements for OpenAFS Client and Server" + contents OPENAFS-RUN + end # Runtime subproduct + fileset + tag OPENAFS-RUN + title "OpenAFS Runtime" + revision A.1.2.10 + architecture HP-UX_B.11.00_32/64 + machine_type *:32* # Machines the product supports (uname -m). + os_name HP-UX # OS'es the product supports (uname -s). + os_release ?.11.00 # OS releases the product supports (uname -r). + os_version * # OS versions the product supports (uname -v). + ancestor OPENAFS.OPENAFS-RUN,fa=HP-UX_B.11.00_32/64,fr=> /usr/afs/etc/CellDB +fi + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-clnt.preinstall b/src/packaging/HP-UX/scripts/openafs-clnt.preinstall new file mode 100644 index 000000000..4b723b159 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-clnt.preinstall @@ -0,0 +1,49 @@ +#!/bin/sh +############## +# Product: OPENAFS +# Fileset: OPENAFS.OPENAFS-CLNT +# preinstall +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + +# +# Shutdown the afsd process before upgrading. This is just cleaner, than +# having SD move the file to #afsd because it's busy and adding it to +# the cleanup file for removal on the next boot. +# + +ps -ef | grep -v grep | grep afsd + +if [[ $? = 0 ]]; then + print "afsd process is running..attempting to shut down afsd process" + /usr/vice/etc/afsd -shutdown + if [[ $? = 0 ]]; then + print "Successfully shutdown the afsd processes." + exitval=$SUCCESS + else + print "Failed to successfully shutdown the afsd process." + exitval=$FAILURE + fi +fi + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-clnt.preremove b/src/packaging/HP-UX/scripts/openafs-clnt.preremove new file mode 100644 index 000000000..8001a3622 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-clnt.preremove @@ -0,0 +1,35 @@ +#!/bin/sh +############## +# Product: OPENAFS +# Fileset: OPENAFS.OPENAFS-CLNT +# preremove +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + +# +# Shutdown the afsd process +# + +/usr/vice/etc/afsd -shutdown + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-clnt.unconfigure b/src/packaging/HP-UX/scripts/openafs-clnt.unconfigure new file mode 100644 index 000000000..9ce3fef35 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-clnt.unconfigure @@ -0,0 +1,31 @@ +#!/bin/sh +############## +# Product: OPENAFS +# Fileset: OPENAFS.OPENAFS-CLNT +# unconfigure +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + + + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-eng-man.configure b/src/packaging/HP-UX/scripts/openafs-eng-man.configure new file mode 100644 index 000000000..670895d47 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-eng-man.configure @@ -0,0 +1,32 @@ +#!/bin/sh + +echo "NOTE: Executing configure script." +####### +# +# (c) Copyright +# +######## + + set -a + UTILS="/usr/lbin/sw/control_utils" + if [[ ! -f ${UTILS} ]] + then + echo "ERROR: Cannot find ${UTILS}" + exit 1 + fi + . ${UTILS} + +############################################################################ +# Set the global PATH to include OPENAFS software +ROOT=/usr/afs/ + +mod_pathfile -a MP ${ROOT}man + +if [[ $? = 2 ]] +then + echo " /etc/MANPATH already contains the OPENAFS component." +else + echo "NOTE: Processes may need to be restarted to inherit" + echo " ${ROOT}/man in their PATH." +fi + diff --git a/src/packaging/HP-UX/scripts/openafs-eng-man.unconfigure b/src/packaging/HP-UX/scripts/openafs-eng-man.unconfigure new file mode 100644 index 000000000..0fade9ba9 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-eng-man.unconfigure @@ -0,0 +1,31 @@ +#!/bin/sh + +echo "NOTE: Executing unconfigure script." +####### +# +# (c) Copyright +# +######## + + set -a + UTILS="/usr/lbin/sw/control_utils" + if [[ ! -f ${UTILS} ]] + then + echo "ERROR: Cannot find ${UTILS}" + exit 1 + fi + . ${UTILS} +################################################ +# Remove the global MANPATH to exclude OPENAFS software +ROOT=/opt/afs/ + +mod_pathfile -d MP ${ROOT}man + +if [[ $? = 2 ]] +then + echo " /etc/MANPATH does not contains the OPENAFS component." +else + echo " ${ROOT}/man removed from /etc/MANPATH." +fi + +exit 0 diff --git a/src/packaging/HP-UX/scripts/openafs-krn.checkremove b/src/packaging/HP-UX/scripts/openafs-krn.checkremove new file mode 100644 index 000000000..e4a892a63 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-krn.checkremove @@ -0,0 +1,39 @@ +#!/bin/sh +############## +# Subproduct: OPENAFS.Kernel +# Fileset: OPENAFS-KRN32 | OPENAFS-KRN64 +# checkremove +# @(#) $Revision: 1.2 +############## +# +# (c) Copyright Hewlett-Packard Company, 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +UTILS=/usr/lbin/sw/control_utils +if [[ ! -f $UTILS ]] +then + print "ERROR: Cannot find the sh functions library $UTILS." + exit 1 +fi + +. $UTILS + +if [[ $SW_SESSION_IS_KERNEL = "TRUE" ]]; then + + # Test here for afs filesystems before removing + # Write stdout to a file + # We really aren't testing, this script is provided as an example + + if [ -s /tmp/afsfilesystem ] ; then + echo "ERROR: AFS filesystems still exist on the system. In order to" + echo " remove the $FILESET fileset, you must remove the " + echo " afs filesystems and re-execute the swremove command." + exit $FAILURE + fi + exit $SUCCESS +fi + diff --git a/src/packaging/HP-UX/scripts/openafs-krn.configure b/src/packaging/HP-UX/scripts/openafs-krn.configure new file mode 100644 index 000000000..8c294b21a --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-krn.configure @@ -0,0 +1,50 @@ +#!/bin/sh +############## +# Subproduct: OPENAFS.Kernel +# Fileset: OPENAFS-KRN32 | OPENAFS-KRN64 +# configure +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + +# +# Check for alternate root installation +# +if [[ -n "${SW_DEFERRED_KERNBLD}" ]] +then + + ########################################## + # # + # Place afs driver into /stand/system # + # # + ########################################## + + mod_systemfile $SW_SYSTEM_FILE_PATH -a afs + if [[ $? -ne 0 ]] + then + print "ERROR: Cannot update $SW_SYSTEM_FILE_PATH to" + print " include afs ($FILESET functionality)." + exitval=$FAILURE + fi +fi + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-krn.postinstall b/src/packaging/HP-UX/scripts/openafs-krn.postinstall new file mode 100644 index 000000000..301a1866f --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-krn.postinstall @@ -0,0 +1,49 @@ +#!/bin/sh +############## +# Subproduct: OPENAFS.Kernel +# Fileset: OPENAFS-KRN32 | OPENAFS-KRN64 +# postinstall +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + +# This check modifies only /stand on the root file system + +if [[ -z "${SW_DEFERRED_KERNBLD}" ]] +then + + ########################################## + # # + # Place afs driver into /stand/system # + # # + ########################################## + + mod_systemfile $SW_SYSTEM_FILE_PATH -a afs + if [[ $? -ne 0 ]] + then + print "ERROR: Cannot update $SW_SYSTEM_FILE_PATH to" + print " include afs ($FILESET functionality)." + exitval=$FAILURE + fi +fi + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-krn.unconfigure b/src/packaging/HP-UX/scripts/openafs-krn.unconfigure new file mode 100644 index 000000000..c29e749bf --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-krn.unconfigure @@ -0,0 +1,44 @@ +#!/bin/sh +############## +# Subproduct: OPENAFS.Kernel +# Fileset: OPENAFS-KRN32 | OPENAFS-KRN64 +# configure +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + + + ########################################## + # # + # Delete driver from /stand/system # + # # + ########################################## + + mod_systemfile $SW_SYSTEM_FILE_PATH -d afs + if [[ $? -ne 0 ]] + then + print "ERROR: Cannot update $SW_SYSTEM_FILE_PATH to" + print " remove afs ($FILESET functionality)." + exitval=$FAILURE + fi + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-krn.verify b/src/packaging/HP-UX/scripts/openafs-krn.verify new file mode 100644 index 000000000..07696162e --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-krn.verify @@ -0,0 +1,53 @@ +#!/bin/sh +############## +# Subproduct: OPENAFS.Kernel +# Fileset: OPENAFS-KRN32 | OPENAFS-KRN64 +# verify +# @(#) $Revision: 1.2 +############## +# +# (c) Copyright Hewlett-Packard Company, 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +UTILS=/usr/lbin/sw/control_utils +if [[ ! -f $UTILS ]] +then + print "ERROR: Cannot find the sh functions library $UTILS." + exit 1 +fi +. $UTILS + +TEMP=/tmp/kern-verify.$$ + +trap "/usr/bin/rm -f $TEMP" HUP INT QUIT TERM ABRT EXIT + +kernel="$(get_kernel_path)" + +/usr/lbin/sysadm/get_sysfile ${kernel} >| $TEMP +if [[ ! -s "$TEMP" ]] +then + print "ERROR: The get_sysfile tool failed on ${kernel}." + exit $FAILURE +fi + +for driver in afs +do + /usr/bin/grep "^${driver}\$" $TEMP >/dev/null 2>&1 + if [[ $? -ne 0 ]] + then + print "WARNING: The \"${driver}\" functionality is not configured in the" + print " kernel (${kernel})." + print " The $FILESET fileset is not properly installed." + exit $WARNING + fi +done + +# +# Finished +# + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-srv.checkremove b/src/packaging/HP-UX/scripts/openafs-srv.checkremove new file mode 100644 index 000000000..e69de29bb diff --git a/src/packaging/HP-UX/scripts/openafs-srv.configure b/src/packaging/HP-UX/scripts/openafs-srv.configure new file mode 100644 index 000000000..d898a6289 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-srv.configure @@ -0,0 +1,48 @@ +#!/bin/sh +############## +# Product: OPENAFS +# Fileset: OPENAFS.OPENAFS-SRV +# configure +# @(#) $Revision$ +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + + + +if [[ -f /sbin/lib/mfsconfig.d/afs ]]; then + print "File /sbin/lib/mfsconfig.d/afs already exists" +else + print "Creating file /sbin/lib/mfsconfig.d/afs" + print "format_revision 1" > /sbin/lib/mfsconfig.d/afs + print "fsck 0 m,P,p,d,f,b:c:y,n,Y,N,q," \ + >> /sbin/lib/mfsconfig.d/afs + chmog 444 bin bin /sbin/lib/mfsconfig.d/afs +fi +# +# Add /sbin/lib/mfsconfig.d/afs to the IPD so it will be removed +# upon removal of the fileset + +print "Adding file /sbin/lib/mfsconfig.d/afs to the OPENAFS.OPENAFS-SRV fileset" +swmodify -x files=/sbin/lib/mfsconfig.d/afs OPENAFS.OPENAFS-SRV + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-srv.postremove b/src/packaging/HP-UX/scripts/openafs-srv.postremove new file mode 100644 index 000000000..5d7a44f2b --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-srv.postremove @@ -0,0 +1,48 @@ +#!/bin/sh +############## +# Product: OPENAFS +# Fileset: OPENAFS.OPENAFS-SRV +# postremove +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + +# +# After the removal of the server, we remove all the files and +# directories associated +# with the server (which was created with the bosserver) + +RMDIRS="/usr/afs/db \ + /usr/afs/local \ + /usr/afs/etc/ThisCell \ + /usr/afs/etc/CellDB \ + /usr/afs/logs" + +for dir in $RMDIRS +do + if [[ -d $dir ]]; then + print "Removing directory $dir" + rm -fr $dir + fi +done + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-srv.preinstall b/src/packaging/HP-UX/scripts/openafs-srv.preinstall new file mode 100644 index 000000000..df0415bc8 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-srv.preinstall @@ -0,0 +1,43 @@ +#!/bin/sh +############## +# Product: OPENAFS +# Fileset: OPENAFS.OPENAFS-SRV +# preinstall +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + +# +# Assume this system is an AFS server +# Shutdown before upgrading. +# +SERVER=`/usr/bin/hostname` + +if [[ -f /usr/afs/bin/bosserver ]]; then + /usr/afs/bin/bos shutdown $SERVER -localauth +fi +# +# The bosserver is still running, kill it +# +kill_named_procs bosserver SIGTERM + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-srv.preremove b/src/packaging/HP-UX/scripts/openafs-srv.preremove new file mode 100644 index 000000000..93cc79583 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-srv.preremove @@ -0,0 +1,42 @@ +#!/bin/sh +############## +# Product: OPENAFS +# Fileset: OPENAFS.OPENAFS-SRV +# preremove +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + +# +# Assume this system is an AFS server +# +SERVER=`/usr/bin/hostname` + +if [[ -f /usr/afs/bin/bosserver ]]; then + /usr/afs/bin/bos shutdown $SERVER -localauth +fi +# +# The bosserver is still running, kill it +# +kill_named_procs bosserver SIGTERM + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-srv.subscript b/src/packaging/HP-UX/scripts/openafs-srv.subscript new file mode 100644 index 000000000..e69de29bb diff --git a/src/packaging/HP-UX/scripts/openafs-srv.unconfigure b/src/packaging/HP-UX/scripts/openafs-srv.unconfigure new file mode 100644 index 000000000..11725a341 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs-srv.unconfigure @@ -0,0 +1,34 @@ +#!/bin/sh +############## +# Product: OPENAFS +# Fileset: OPENAFS.OPENAFS-SRV +# configure +# @(#) $Revision$ +# @(#) $Revision$ +############## +# +# (c) Copyright 2003 +# +######## + +# The global variables SUCCESS, FAILURE, WARNING, EXCLUDE, PATH, ROOT, +# SW_CTL_SCRIPT_NAME, _pf, PRODUCT, and FILESET are all set by control_utils. + +set -a +UTILS="/usr/lbin/sw/control_utils" +if [[ ! -f ${UTILS} ]] +then + echo "ERROR: Cannot find ${UTILS}" + exit 1 +fi +. ${UTILS} + +exitval=$SUCCESS # Anticipate success + +############################################################################ + +# +# Removal of /sbin/lib/mfsconfig.d/afs is done automatically +# since we add it to the IPD in the configure script. + +exit $exitval diff --git a/src/packaging/HP-UX/scripts/openafs-srv.verify b/src/packaging/HP-UX/scripts/openafs-srv.verify new file mode 100644 index 000000000..e69de29bb diff --git a/src/packaging/HP-UX/scripts/openafs.configure b/src/packaging/HP-UX/scripts/openafs.configure new file mode 100644 index 000000000..4ac3a9141 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs.configure @@ -0,0 +1,49 @@ +#!/bin/sh + +echo "NOTE: Executing configure script." +####### +# +# (c) Copyright Hewlett-Packard Company 1994 +# +######## + + set -a + UTILS="/usr/lbin/sw/control_utils" + if [[ ! -f ${UTILS} ]] + then + echo "ERROR: Cannot find ${UTILS}" + exit 1 + fi + . ${UTILS} + +############################################################################ +# Set the global PATH to include OPENAFS software +ROOT=/usr/afs/ +mod_pathfile -a P ${ROOT}bin + +if [[ $? = 2 ]] +then + echo " /etc/PATH already contains the OPENAFS component." +else + echo "NOTE: Processes may need to be restarted to inherit" + echo " ${ROOT}/bin in their PATH." +fi + +if [[ -f /usr/newconfig/sbin/init.d/afs ]]; then + + # Copy from the original to /sbin/init.d + + cp /usr/newconfig/sbin/init.d/afs /sbin/init.d + chmog 555 bin bin /sbin/init.d/afs + + # Insert the sym links for startup and shutdown + # Assume possible upgrade! if the link is there, don't relink + # + if [[ ! -h /sbin/rc2.d/K800afs ]]; then + ln -s /sbin/init.d/afs /sbin/rc2.d/K800afs + fi + if [[ ! -h /sbin/rc2.d/S460afs ]]; then + ln -s /sbin/init.d/afs /sbin/rc2.d/S460afs + fi + +fi diff --git a/src/packaging/HP-UX/scripts/openafs.postremove b/src/packaging/HP-UX/scripts/openafs.postremove new file mode 100644 index 000000000..e4b3b2b94 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs.postremove @@ -0,0 +1,46 @@ +#!/bin/sh + +echo "NOTE: Executing configure script." +####### +# +# (c) Copyright Hewlett-Packard Company 1994 +# +######## + + set -a + UTILS="/usr/lbin/sw/control_utils" + if [[ ! -f ${UTILS} ]] + then + echo "ERROR: Cannot find ${UTILS}" + exit 1 + fi + . ${UTILS} + +############################################################################ +# Removing the OPENOAFS product means cleanup everything! + +# Kill ruthlessly.. + +PROCS="bosserver fileserver volserver buserver ptserver kaserver vlserver \ + upserver upclient" + +for proc in $PROCS +do + kill_named_procs $proc SIGKILL +done + + +rm -fr /usr/vice +if [[ $? != 0 ]] + print " Could not remove the /usr/vice directory, adding it to the" + print " cleanup file" + print "/usr/vice" >> /var/adm/cleanupfile +fi +rm -fr /usr/afs +if [[ $? != 0 ]] + print " Could not remove the /usr/afs directory, adding it to the" + print " cleanup file" + print "/usr/afs" >> /var/adm/cleanupfile +fi + + diff --git a/src/packaging/HP-UX/scripts/openafs.unconfigure b/src/packaging/HP-UX/scripts/openafs.unconfigure new file mode 100644 index 000000000..0483b6ea9 --- /dev/null +++ b/src/packaging/HP-UX/scripts/openafs.unconfigure @@ -0,0 +1,53 @@ +#!/bin/sh + +echo "NOTE: Executing unconfigure script." +####### +# +# (c) Copyright Hewlett-Packard Company 1994 +# @(#) OpenAFS unconfigure v1.2 4/22/03 +######## + + set -a + UTILS="/usr/lbin/sw/control_utils" + if [[ ! -f ${UTILS} ]] + then + echo "ERROR: Cannot find ${UTILS}" + exit 1 + fi + . ${UTILS} +# +# Anticipate SUCCESS +exitval=$SUCCESS + +################################################ +# Set the global PATH to include OPENAFS software +ROOT=/opt/afs/ +mod_pathfile -d P ${ROOT}bin + +if [[ $? = 2 ]] +then + echo " $ROOT already removed from /etc/PATH." +else + echo " ${ROOT}/bin removed from path" +fi + +# Remove the startup/shutdown scripts from /sbin/init.d and /sbin/rc2.d +# Remove the configuration files inserted by the configure script + +RMFILES="/usr/vice/etc/AFSlog \ + /usr/vice/etc/CellServDB \ + /usr/vice/etc/ThisCell \ + /usr/vice/etc/cacheinfo \ + /sbin/rc2.d/K800afs \ + /sbin/rc2.d/S460afs \ + /sbin/init.d/afs" + +for file in $RMFILES +do + if [[ -f $file ]];then + print "Removing file $file" + rm $file + fi +done + +exit $exitval diff --git a/src/packaging/HP-UX/swpackage/psf-1.2.8-transarc-paths-11.00 b/src/packaging/HP-UX/swpackage/psf-1.2.8-transarc-paths-11.00 deleted file mode 100644 index 7b1be167d..000000000 --- a/src/packaging/HP-UX/swpackage/psf-1.2.8-transarc-paths-11.00 +++ /dev/null @@ -1,590 +0,0 @@ -# File: psf-1.2.8 -# -# Purpose: OpenAFS Product Specification File (PSF) for swpackage -# -# Copyright: Copyright (c) 2003 -# -# Header: $Header$ -# -# Description: This PSF contains a valid product definition which includes -# all attributes for OpenAFS installation via software Distributor -# -# -# Not all control scripts are required for installation of a product/fileset -# -# Below is the list of control scripts that can be used on either -# Products or filesets - # Control script definition(s): - # - # Control scripts are optional. If defined, then specify the - # path to the script file. - # - # NOTE: control scripts can be defined for products too. - - #checkinstall path # Install check script - #preinstall path # Install pre-load script - #postinstall path # Install post-load script - #configure path # Configure for use script - #unconfigure path # Configure undo script - #verify path # Verify integrity script - #checkremove path # Remove check script - #preremove path # Remove pre-remove script - #postremove path # Remove post-remove script - #control_file path # Addition (sub)script or control data - - - vendor - - tag "OpenSource" # The identifier for the vendor. - title "OpenSource Software" # The name of the vendor. -# uuid "" # The NetLs UUID for the vendor. - description < data/vendor.description # A multi-line description of the vendor. - - end #Vendor - - # Product definition(s): - # - # All product attributes are optional, except for the tag and the - # filesets which must be contained within it. - - product - - tag "OPENAFS" # The identifier for the product. - title "Open Source Andrews File System" # The name of the product. - revision "A.1.2.8" # The revision (release) number of the product. - - #number "the_number" # The order/part number for the product. - category "OpenSource"" # The type of software (identifier). - #category_title "the category title" # The type of software (string). - - description < data/product.description # A file containing a - #multi-line description of the product. - - copyright "(c)Copyright 2002 OpenAFS, All Rights Reserved." - - readme < data/product.README # A multi-page README for the product. - - - architecture HP-UX_B.11.00_32/64 # A concise summary of hardware/OS'es - #supported. - - machine_type *:32* # Machines the product supports (uname -m). - os_name HP-UX # OS'es the product supports (uname -s). - os_release ?.11.00 # OS releases the product supports (uname -r). - os_version * # OS versions the product supports (uname -v). - - directory /usr/afs # The root directory for the product - is_locatable false # If defined then users can install the product - # into any directory they specify. - - # Control script definition(s): - # - # Control scripts are optional. If defined, then specify the - # path to the script file. - # - # NOTE: control scripts can be defined for products or filesets - - configure scripts/openafs.configure - unconfigure scripts/openafs.unconfigure - - # Subproduct definition(s): - # - # Subproducts are optional. If defined, then they group/partition - # the product's filesets into logical sets. If defined, then the - # tag and contents are required. - # - # The Runtime subproduct contains anything that is pertinant to - # either the server or client products - # - # - subproduct - tag Runtime - title "Rutime Requirements for OpenAFS Client and Server" - contents OPENAFS-RUN - end # Runtime subproduct - fileset - tag OPENAFS-RUN - title "OpenAFS Runtime" - revision A.1.2.8 - architecture HP-UX_B.11.00_32/64 - machine_type *:32* # Machines the product supports (uname -m). - os_name HP-UX # OS'es the product supports (uname -s). - os_release ?.11.00 # OS releases the product supports (uname -r). - os_version * # OS versions the product supports (uname -v). - ancestor OPENAFS.OPENAFS-RUN,fa=HP-UX_B.11.00_32/64,fr=