#!/bin/sh
#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident	"@(#)preinstall	1.1	08/11/12 SMI"
#
# preinstall - register the swat service on port: 901/tcp
#

ed -s ${PKG_INSTALL_ROOT}/etc/inet/services >/dev/null 2>/dev/null <<EDITFILE
g/^swat[ 	]/d
g/^\#\[swat\]/d
$
a
#[swat] The swat service is added by the SUNWsmbar package.
#[swat] Removing the swat service manually while SUNWsmbar
#[swat] package is installed in the system can cause issues
#[swat] with smf(5) stability or with zones(5) installation.
swat		901/tcp				# Samba Web Adm.Tool
.
w
q
EDITFILE

