#!/bin/sh
#
# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
#ident	"@(#)postinstall	1.1	07/05/15 SMI"
#
# postinstall - leaving the samba service enabled after the reinstallation 
#               over the allready configured (and most probably running)
#               samba
#

if [ -z "$PKG_INSTALL_ROOT" -o "$PKG_INSTALL_ROOT" = "/" ] ; then
	cat >> /var/svc/profile/upgrade <<-_ENABLE_SMB
	if [ -f /etc/sfw/smb.conf ]; then
	    /usr/sbin/svcadm enable svc:/network/wins:default
	    /usr/sbin/svcadm enable svc:/network/samba:default
	fi
	_ENABLE_SMB
fi
