i.mailxrc revision 7c478bd95313f5f23a4c958a745db2134aa03244
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# CDDL HEADER START
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# The contents of this file are subject to the terms of the
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# Common Development and Distribution License, Version 1.0 only
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# (the "License"). You may not use this file except in compliance
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# with the License.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# See the License for the specific language governing permissions
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# and limitations under the License.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# CDDL HEADER END
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User#ident "%Z%%M% %I% %E% SMI"
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# Copyright (c) 1995 by Sun Microsystems, Inc.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User# All rights reserved.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User if [ ! -f $dest ] ; then
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User # determine whether existing etc/mail/mailx.rc file is
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User # based on the same one being installed. If so, no need
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User # to update it.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User newrev="`sed -n 's/^.*\(@(#)mailx\.rc.*\)\".*/\1/p' $src`"
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User sed -n -e 's/^\([^#]*\).*$/\1/p' < $dest > $scrfile
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User # if either of the following is defined, no need to update.
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User # existing /etc/mail/mailx.rc file is based on
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User # the original installed version
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User echo "# The following 3 settings produce the familiar Solaris behavior." > $txtfile
fae13836a33b474a6aa2c147df8334f5b1ffae45Tinderbox User printf "1 c\n# \"%s\"\n.\n1 r %s\nw\nq\n" "$newrev" $txtfile | ed -s $dest