1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the License). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/CDDL.txt 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/CDDL.txt. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets [] replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 1998-2002 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 * 26 * dns_update.c - Update method for highly available DNS 27 */ 28 29 #pragma ident "@(#)dns_update.c 1.15 07/06/06 SMI" 30 31 #include "dns.h" 32 33 /* 34 * If parameters related to the fault monitor are changed, 35 * just restarting the monitor should be enough. 36 * For DNS related configuration changes (e.g. if the user has 37 * edited named.conf in some way...) we need to restart the 38 * DNS daemon as well? 39 */ 40 41 int 42 main(int argc, char *argv[]) 43 { 44 scds_handle_t handle; 45 int result; 46 47 if (scds_initialize(&handle, argc, argv) != SCHA_ERR_NOERR) 48 return (1); 49 50 /* 51 * Some of the properties have been changed. Restart the fault monitor 52 * atleast. 53 */ 54 55 result = scds_pmf_restart_fm(handle, 0); 56 if (result != SCHA_ERR_NOERR) { 57 scds_syslog(LOG_ERR, "Failed to restart fault monitor."); 58 scds_close(&handle); 59 return (1); 60 } 61 62 scds_syslog(LOG_INFO, "Completed successfully."); 63 scds_close(&handle); 64 65 return (0); 66 } 67