changeset 14997:ec04a1337236

Merge pull request #158 from sdimitro/rm_ipsecalgs fixes #9 nuke ipsecalgs class action scripts
author Garrett D'Amore <garrett@damore.org>
date Thu, 08 Jan 2015 10:59:01 -0800
parents c9fe866c7f56 (current diff) 543c76878df2 (diff)
children dd9761e65159
files usr/src/cmd/cmd-inet/usr.sadm/Makefile usr/src/cmd/cmd-inet/usr.sadm/scripts/Makefile usr/src/cmd/cmd-inet/usr.sadm/scripts/i.ipsecalgs usr/src/cmd/cmd-inet/usr.sadm/scripts/r.ipsecalgs
diffstat 6 files changed, 1 insertions(+), 235 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/cmd-inet/Makefile	Thu Jan 08 10:57:31 2015 -0800
+++ b/usr/src/cmd/cmd-inet/Makefile	Thu Jan 08 10:59:01 2015 -0800
@@ -25,7 +25,7 @@
 
 include		../Makefile.cmd
 
-SUBDIRS=	etc lib sbin usr.bin usr.sbin usr.lib usr.sadm
+SUBDIRS=	etc lib sbin usr.bin usr.sbin usr.lib
 MSGSUBDIRS=	usr.bin usr.sbin usr.lib
 POFILES=	usr.bin/usr.bin.po usr.sbin/usr.sbin.po
 POFILE=		cmd-inet.po
--- a/usr/src/cmd/cmd-inet/usr.sadm/Makefile	Thu Jan 08 10:57:31 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#
-# 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.
-#
-# 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 1999-2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# Copyright 2014 Garrett D'Amore <garrett@damore.org>
-#
-# cmd/cmd-inet/usr.sadm/Makefile
-
-SUBDIRS2=	scripts
-
-include ../../Makefile.cmd
-
-all:=		TARGET= all
-install:=	TARGET= install
-clean:=		TARGET= clean
-clobber:=	TARGET= clobber
-lint:=		TARGET= lint
-
-.KEEP_STATE:
-
-.PARALLEL: $(SUBDIRS1) $(SUBDIRS2)
-
-all clean clobber lint: $(SUBDIRS1)
-
-install: $(SUBDIRS1) $(SUBDIRS2)
-
-$(SUBDIRS1) $(SUBDIRS2): FRC
-	@cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
--- a/usr/src/cmd/cmd-inet/usr.sadm/scripts/Makefile	Thu Jan 08 10:57:31 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-#
-# 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.
-#
-# 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 2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-CLASS_ACTION_SCRIPTS = i.ipsecalgs r.ipsecalgs
-
-include ../../../Makefile.cmd
-
-.KEEP_STATE:
-
-INSTALL_DIR =		$(ROOT)/usr/sadm/install
-CLASS_SCR_DIR =		$(INSTALL_DIR)/scripts
-CLASS_SCR_FILES =	$(CLASS_ACTION_SCRIPTS:%=$(CLASS_SCR_DIR)/%)
-
-$(CLASS_SCR_DIR)/%: %
-	$(INS.file)
-
-install: $(CLASS_SCR_FILES)
--- a/usr/src/cmd/cmd-inet/usr.sadm/scripts/i.ipsecalgs	Thu Jan 08 10:57:31 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-#
-# Copyright 2005 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, Version 1.0 only
-# (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"
-#
-# Class action script for ipsecalgs class files.
-#
-# This script appends the input file from the package to the 
-# /etc/inet/ipsecalgs file.
-#
-
-pkg_start="# Start $PKGINST"
-pkg_end="# End $PKGINST"
-confile=/etc/inet/ipsecalgs
-tmpfile=/tmp/$$ipsecalgs
-error=no
- 
-while read src dest
-do
-	[ "$src" = /dev/null ] && continue
-
-	if [ -f "$dest" ]
-	then
-		# If the package has been already installed, remove old entries
-		grep "$pkg_start" $dest > /dev/null
-		if [ $? -eq 0 ]
-		then
-			sed -e "/$pkg_start/,/$pkg_end/d" $dest > $tmpfile \
-			|| error=yes
-		else
-			cp $dest $tmpfile || error=yes
-		fi
-
-		# Append the delimiters and entries of this package 
-		echo "$pkg_start" >> $tmpfile || error=yes
-		cat $src >> $tmpfile || error=yes
-		echo "$pkg_end" >> $tmpfile || error=yes
-    
-		# Install the updated config file and clean up the tmp file
-                if [ "$error" = no ]
-                then 
-			mv $tmpfile $dest || error=yes
-		fi
-		rm -f $tmpfile   
-	else
-		echo "$0: ERROR - the $confile file doesn't exist."
-		exit 2
-	fi
-done
-
-if [ "$error" = yes ]
-then
-	echo "$0: ERROR - failed to update the $confile file."
-	exit 2
-fi
-exit 0
--- a/usr/src/cmd/cmd-inet/usr.sadm/scripts/r.ipsecalgs	Thu Jan 08 10:57:31 2015 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-#
-# Copyright 2005 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, Version 1.0 only
-# (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"
-#
-# Removal class action script for ipsecalgs class files.
-#
-# This script removes entries belonging to the package from the 
-# /etc/inet/ipsecalgs file.
-#
-
-pkg_start="# Start $PKGINST"
-pkg_end="# End $PKGINST"
-confile=/etc/inet/ipsecalgs
-tmpfile=/tmp/$$ipsecalgs
-error=no
-
-while read dest
-do
-	# Strip all entries belonging to this package
-	grep "$pkg_start" $dest > /dev/null
-	if [ $? -eq 0 ]
-    	then
-		sed -e "/$pkg_start/,/$pkg_end/d" $dest > $tmpfile || error=yes
-		if [ "$error" = no ]
-                then 
-			mv $tmpfile $dest || error=yes
-		fi
-		rm -f $tmpfile
-	else
-		echo "$0: WARNING - no entries to be removed from the $confile  file" 
-		exit 0
-	fi
-done
-
-if [ "$error" = yes ]
-then
-	echo "$0: ERROR - failed to update the $confile file."
-	exit 2
-fi
-exit 0
--- a/usr/src/pkg/manifests/SUNWcs.mf	Thu Jan 08 10:57:31 2015 -0800
+++ b/usr/src/pkg/manifests/SUNWcs.mf	Thu Jan 08 10:59:01 2015 -0800
@@ -1240,13 +1240,11 @@
 file path=usr/lib/vtxlock mode=0555
 file path=usr/sadm/bin/puttext mode=0555
 file path=usr/sadm/install/miniroot.db group=sys mode=0444
-file path=usr/sadm/install/scripts/i.ipsecalgs group=sys mode=0555
 file path=usr/sadm/install/scripts/i.kcfconf group=sys mode=0555
 file path=usr/sadm/install/scripts/i.kmfconf group=sys mode=0555
 file path=usr/sadm/install/scripts/i.manifest group=sys mode=0555
 file path=usr/sadm/install/scripts/i.pkcs11conf group=sys mode=0555
 file path=usr/sadm/install/scripts/i.rbac group=sys mode=0555
-file path=usr/sadm/install/scripts/r.ipsecalgs group=sys mode=0555
 file path=usr/sadm/install/scripts/r.kcfconf group=sys mode=0555
 file path=usr/sadm/install/scripts/r.kmfconf group=sys mode=0555
 file path=usr/sadm/install/scripts/r.manifest group=sys mode=0555