postinstall revision 7c478bd95313f5f23a4c958a745db2134aa03244
25cc5fbba63f84b47e389af749f55abbbde71c8cChristian Maeder# CDDL HEADER START
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# The contents of this file are subject to the terms of the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# Common Development and Distribution License, Version 1.0 only
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# (the "License"). You may not use this file except in compliance
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# with the License.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# or http://www.opensolaris.org/os/licensing.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# See the License for the specific language governing permissions
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# and limitations under the License.
335039f3702f6a2584ede16128a00a51fd5b8bf8Jorina Freya Gerken# When distributing Covered Code, include this CDDL HEADER in each
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c6fcd42c6d6d9dae8c7835c24fcb7ce8531a9050Christian Maeder# If applicable, add the following below this CDDL HEADER, with the
ce8b15da31cd181b7e90593cbbca98f47eda29d6Till Mossakowski# fields enclosed by brackets "[]" replaced with your own identifying
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder# information: Portions Copyright [yyyy] [name of copyright owner]
760ae19a92dde8249679a674f93f58d26a7c5f6bChristian Maeder# CDDL HEADER END
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder# Use is subject to license terms.
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich#pragma ident "%Z%%M% %I% %E% SMI"
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich# SUNWpmr postinstall script
e593b89bfd4952698dc37feced21cefe869d87a2Christian Maeder# If the old format of "autoshutdown" is used, upgrade it to the new format.
6e049108aa87dc46bcff96fae50a4625df1d9648Klaus Luettich/bin/grep -s "${SHUTDOWN_PATTERN}" $BASEDIR/etc/power.conf >/dev/null
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maederif [ $? = 0 ] ; then
c6fcd42c6d6d9dae8c7835c24fcb7ce8531a9050Christian Maeder set - `/bin/grep "${SHUTDOWN_PATTERN}" $BASEDIR/etc/power.conf`
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder ) | ed -s $BASEDIR/etc/power.conf > /dev/null
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich if [ $? != 0 ] ; then
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich echo "Updating autoshutdown entry failed."
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder# adds sysidpm to the list of applications run out of sysidconfig.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder /usr/sbin/sysidconfig -b "${BASEDIR}" -l | /usr/bin/grep -s sysidpm >/dev/null
97812b7ce9860bf514a8822a63503451795dbc65Klaus Luettich if [ $? -ne 0 ]; then
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder /usr/sbin/sysidconfig -b "${BASEDIR}" -a /usr/sbin/sysidpm
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder /usr/bin/grep -s sysidpm ${BASEDIR}/etc/.sysidconfig.apps >/dev/null
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder if [ $? -ne 0 ]; then
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder echo /usr/sbin/sysidpm >> ${BASEDIR}/etc/.sysidconfig.apps
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder# .cpr_config file is moved to /etc directory