sendmail revision da978630d1f0b07bd370e402117d4d9b17bac427
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose#!/sbin/sh
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose#
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# CDDL HEADER START
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose#
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# The contents of this file are subject to the terms of the
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# Common Development and Distribution License (the "License").
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# You may not use this file except in compliance with the License.
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose#
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# or http://www.opensolaris.org/os/licensing.
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# See the License for the specific language governing permissions
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# and limitations under the License.
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose#
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# When distributing Covered Code, include this CDDL HEADER in each
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# If applicable, add the following below this CDDL HEADER, with the
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# fields enclosed by brackets "[]" replaced with your own identifying
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# information: Portions Copyright [yyyy] [name of copyright owner]
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose#
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# CDDL HEADER END
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose#
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose#
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# Use is subject to license terms.
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose#
09d7c105839bfc7447ea0f766413ed86675ca075Sumit Bose
dea636af4d1902a081ee891f1b19ee2f8729d759Pavel Březina# This service is managed by smf(5). Thus, this script provides
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose# compatibility with previously documented init.d script behaviour.
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose
08ab0d4ede41a1749e0bc26f78a37a4d10c20db8Sumit Bosecase "$1" in
70673115c03c37ddc64c951b53d92df9d3310762Sumit Bose'restart')
08ab0d4ede41a1749e0bc26f78a37a4d10c20db8Sumit Bose # The previous init.d/sendmail restart behaviour matches
204cfc89a076fd32bf34f2abb3f809304aaa88abSimo Sorce # the smf(5) 'refresh' semantics.
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose svcadm refresh network/smtp:sendmail
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny svcadm refresh network/sendmail-client:default
386a66b1aa18a176e6a06fa126556c9590c373b6Sumit Bose ;;
84c611c1b7c04cc7735ab54d4e5f48284b79e6fbJan Zeleny
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose'start')
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose svcadm enable -t network/smtp:sendmail
386a66b1aa18a176e6a06fa126556c9590c373b6Sumit Bose svcadm enable -t network/sendmail-client:default
386a66b1aa18a176e6a06fa126556c9590c373b6Sumit Bose ;;
5e60c73cb91d1659755fb5ea829837db68d46163Sumit Bose
39f21d2b61685362642d42bc2f94f829671cd5efSumit Bose'stop')
386a66b1aa18a176e6a06fa126556c9590c373b6Sumit Bose svcadm disable -t network/smtp:sendmail
386a66b1aa18a176e6a06fa126556c9590c373b6Sumit Bose svcadm disable -t network/sendmail-client:default
386a66b1aa18a176e6a06fa126556c9590c373b6Sumit Bose ;;
386a66b1aa18a176e6a06fa126556c9590c373b6Sumit Bose
386a66b1aa18a176e6a06fa126556c9590c373b6Sumit Bose*)
386a66b1aa18a176e6a06fa126556c9590c373b6Sumit Bose echo "Usage: $0 { start | stop | restart }"
81165faf5d951aca69f410713730c26ff048ec44Sumit Bose exit 1
08ab0d4ede41a1749e0bc26f78a37a4d10c20db8Sumit Bose ;;
08ab0d4ede41a1749e0bc26f78a37a4d10c20db8Sumit Boseesac
4c20fe34346919cf676c3e1b54b7701069e2aac6Simo Sorce