Mercurial > illumos > illumos-gate
changeset 4993:91d68a3811ac
6567270 SUNWefcr cannot be removed if the efdaemon service is enabled
author | dhain |
---|---|
date | Tue, 04 Sep 2007 14:29:10 -0700 |
parents | 18d161314626 |
children | fac39b5552ed |
files | usr/src/pkgdefs/SUNWefcr/Makefile usr/src/pkgdefs/SUNWefcr/postinstall.tmpl usr/src/pkgdefs/SUNWefcr/preremove.tmpl usr/src/pkgdefs/SUNWefcr/prototype_com |
diffstat | 4 files changed, 100 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/pkgdefs/SUNWefcr/Makefile Tue Sep 04 14:18:51 2007 -0700 +++ b/usr/src/pkgdefs/SUNWefcr/Makefile Tue Sep 04 14:29:10 2007 -0700 @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# 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. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #pragma ident "%Z%%M% %I% %E% SMI" @@ -30,9 +29,12 @@ DATAFILES += i.manifest r.manifest depend +TMPLFILES += preremove postinstall + .KEEP_STATE: all: $(FILES) install: all pkg include ../Makefile.targ +include ../Makefile.prtarg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usr/src/pkgdefs/SUNWefcr/postinstall.tmpl Tue Sep 04 14:29:10 2007 -0700 @@ -0,0 +1,50 @@ +#!/bin/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. +# +# pragma ident "%Z%%M% %I% %E% SMI" +# + +# +# Not all platforms support efcode. +# Daemon support is based upon finding the +# "pcicfg.e (PCIe/PCI Config (EFCode Enabled)" +# module in the modinfo output +# +if [ "${BASEDIR}" = "/" ] ; then + if [ `/usr/sbin/modinfo | /usr/bin/grep -c pcicfg` != "0" ]; then + /usr/sbin/svcadm enable \ + svc:/platform/`/usr/bin/uname -m`/efdaemon + fi +else + cat >> $BASEDIR/var/svc/profile/upgrade <<\_EFCR_UPGRADE_1 + if [ `/usr/sbin/modinfo | /usr/bin/grep -c pcicfg` != "0" ]; then + /usr/sbin/svcadm enable \ + svc:/platform/`/usr/bin/uname -m`/efdaemon + fi +_EFCR_UPGRADE_1 + +fi + +exit 0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/usr/src/pkgdefs/SUNWefcr/preremove.tmpl Tue Sep 04 14:29:10 2007 -0700 @@ -0,0 +1,39 @@ +#!/bin/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. +# +# pragma ident "%Z%%M% %I% %E% SMI" +# + +ARCH=`/usr/bin/uname -m` + +svcprop -q svc:/platform/${ARCH}/efdaemon || exit 0 + +/usr/sbin/svcadm disable svc:/platform/${ARCH}/efdaemon + +if [ $? -ne 0 ]; then + exit 1 +fi + +exit 0
--- a/usr/src/pkgdefs/SUNWefcr/prototype_com Tue Sep 04 14:18:51 2007 -0700 +++ b/usr/src/pkgdefs/SUNWefcr/prototype_com Tue Sep 04 14:29:10 2007 -0700 @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# 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. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # #ident "%Z%%M% %I% %E% SMI" @@ -39,6 +38,8 @@ i pkginfo i copyright i depend +i preremove +i postinstall i i.manifest i r.manifest #