diff options
Diffstat (limited to 'usr/src/pkgdefs/SUNWnxge.u')
-rw-r--r-- | usr/src/pkgdefs/SUNWnxge.u/Makefile | 38 | ||||
-rw-r--r-- | usr/src/pkgdefs/SUNWnxge.u/pkginfo.tmpl | 49 | ||||
-rw-r--r-- | usr/src/pkgdefs/SUNWnxge.u/postinstall | 81 | ||||
-rw-r--r-- | usr/src/pkgdefs/SUNWnxge.u/postremove | 38 | ||||
-rw-r--r-- | usr/src/pkgdefs/SUNWnxge.u/prototype_com | 48 | ||||
-rw-r--r-- | usr/src/pkgdefs/SUNWnxge.u/prototype_sparc | 58 |
6 files changed, 312 insertions, 0 deletions
diff --git a/usr/src/pkgdefs/SUNWnxge.u/Makefile b/usr/src/pkgdefs/SUNWnxge.u/Makefile new file mode 100644 index 0000000000..71b302a489 --- /dev/null +++ b/usr/src/pkgdefs/SUNWnxge.u/Makefile @@ -0,0 +1,38 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +include ../Makefile.com + +DATAFILES += depend i.renameold + +.KEEP_STATE: + +all: $(FILES) postinstall postremove + +install: all pkg + +include ../Makefile.targ diff --git a/usr/src/pkgdefs/SUNWnxge.u/pkginfo.tmpl b/usr/src/pkgdefs/SUNWnxge.u/pkginfo.tmpl new file mode 100644 index 0000000000..ea65126045 --- /dev/null +++ b/usr/src/pkgdefs/SUNWnxge.u/pkginfo.tmpl @@ -0,0 +1,49 @@ +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# ident "%Z%%M% %I% %E% SMI" +# +# This required package information file describes characteristics of the +# package, such as package abbreviation, full package name, package version, +# and package architecture. +# +PKG="SUNWnxge" +NAME="Sun NIU leaf driver" +ARCH="sparc.sun4u" +VERSION="ONVERS,REV=0.0.0" +SUNW_PRODNAME="SunOS" +SUNW_PRODVERS="RELEASE/VERSION" +SUNW_PKGTYPE="root" +SUNW_PKG_ALLZONES="true" +SUNW_PKG_HOLLOW="true" +SUNW_PKG_THISZONE="false" +MAXINST="1000" +CATEGORY="system" +DESC="Sun NIU 10Gb/1Gb driver" +VENDOR="Sun Microsystems, Inc." +HOTLINE="Please contact your local service provider" +EMAIL="" +CLASSES="none renameold" +BASEDIR=/ +SUNW_PKGVERS="1.0" + diff --git a/usr/src/pkgdefs/SUNWnxge.u/postinstall b/usr/src/pkgdefs/SUNWnxge.u/postinstall new file mode 100644 index 0000000000..20a179a756 --- /dev/null +++ b/usr/src/pkgdefs/SUNWnxge.u/postinstall @@ -0,0 +1,81 @@ +#!/sbin/sh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +set -u + +PATH="/usr/bin:/usr/sbin:${PATH}" +export PATH + +# +# Driver info +# +DRV=nxge +DRVALIAS=" \"pciex108e,abcd\" \"SUNW,niusl\"" + +DRVPERM='* 0600 root sys' +# POLICY='read_priv_set=net_rawaccess write_priv_set=net_rawaccess' +MAJORDEV=11 + +# +# Select the correct add_drv options to execute. +# +if [ "${BASEDIR}" = "/" ]; then + # + # Irrespective of whether hardware exists + # or not don't attempt to attach driver + # to the hardware. This is to avoid problems + # with installing a 32 bit driver on a 64 bit + # running system. + # + ADD_DRV="add_drv -n" +else + # + # On a client, + # modify the system files and touch/reconfigure + # for reconfigure reboot + # + ADD_DRV="add_drv -b ${BASEDIR}" +fi + +# +# Make sure add_drv has *not* been previously executed +# before attempting to add the driver. +# +grep -w "${DRV}" ${BASEDIR}/etc/name_to_major > /dev/null 2>&1 +if [ $? -eq 1 ]; then + ${ADD_DRV} -m "${DRVPERM}" -i "${DRVALIAS}" ${DRV} + if [ $? -ne 0 ]; then + echo "\nFailed add_drv!\n" >&2 + exit 1 + fi +else + echo " add_drv Failed; ${DRV} is already in ${BASEDIR}/etc/name_to_major" + exit 0 +fi + +exit 0 diff --git a/usr/src/pkgdefs/SUNWnxge.u/postremove b/usr/src/pkgdefs/SUNWnxge.u/postremove new file mode 100644 index 0000000000..9839cb4cd6 --- /dev/null +++ b/usr/src/pkgdefs/SUNWnxge.u/postremove @@ -0,0 +1,38 @@ +#!/sbin/sh +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# + +BD=${BASEDIR:-/} +if grep -w nxge $BD/etc/name_to_major > /dev/null 2>&1 +then + rem_drv -b ${BD} nxge + if [ $? -ne 0 ] + then + exit 1 + fi +fi +exit 0 diff --git a/usr/src/pkgdefs/SUNWnxge.u/prototype_com b/usr/src/pkgdefs/SUNWnxge.u/prototype_com new file mode 100644 index 0000000000..b432867c8d --- /dev/null +++ b/usr/src/pkgdefs/SUNWnxge.u/prototype_com @@ -0,0 +1,48 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# This required package information file contains a list of package contents. +# The 'pkgmk' command uses this file to identify the contents of a package +# and their location on the development machine when building the package. +# Can be created via a text editor or through use of the 'pkgproto' command. + +#!search <pathname pathname ...> # where to find pkg objects +#!include <filename> # include another 'prototype' file +#!default <mode> <owner> <group> # default used if not specified on entry +#!<param>=<value> # puts parameter in pkg environment + +# packaging files +i pkginfo +i copyright +i depend +i postinstall +i postremove +i i.renameold +# +# source locations relative to the prototype file +# +# SUNWnxge.u +# diff --git a/usr/src/pkgdefs/SUNWnxge.u/prototype_sparc b/usr/src/pkgdefs/SUNWnxge.u/prototype_sparc new file mode 100644 index 0000000000..01cb0882df --- /dev/null +++ b/usr/src/pkgdefs/SUNWnxge.u/prototype_sparc @@ -0,0 +1,58 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# +# +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" +# +# This required package information file contains a list of package contents. +# The 'pkgmk' command uses this file to identify the contents of a package +# and their location on the development machine when building the package. +# Can be created via a text editor or through use of the 'pkgproto' command. + +#!search <pathname pathname ...> # where to find pkg objects +#!include <filename> # include another 'prototype' file +#!default <mode> <owner> <group> # default used if not specified on entry +#!<param>=<value> # puts parameter in pkg environment + +# packaging files +# +# Include ISA independent files (prototype_com) +# +!include prototype_com +# +# +# +# List files which are SPARC specific here +# +# source locations relative to the prototype file +# +# +# SUNWnxge.u +# +d none platform 755 root sys +d none platform/sun4u 755 root sys +d none platform/sun4u/kernel 755 root sys +d none platform/sun4u/kernel/drv 755 root sys +e renameold platform/sun4u/kernel/drv/nxge.conf 0644 root sys +d none platform/sun4u/kernel/drv/sparcv9 755 root sys +f none platform/sun4u/kernel/drv/sparcv9/nxge 755 root sys |