/**
 * File:	include/dns-server/misc.ycp
 * Package:	Configuration of dns-server
 * Summary:	Miscelanous functions for configuration of dns-server.
 * Authors:	Jiri Srain <jsrain@suse.cz>
 *
 * $Id: misc.ycp 20199 2004-11-05 08:08:23Z locilka $
 */

{

    textdomain "dns-server";

    import "Require";
    import "Mode";
    import "Label";
    import "Service";


    /**
     * Restart the DNS daemon
     */
    define void RestartDnsDaemon () ``{
	Service::RunInitScript("named", "restart");
    }

    /**
      * Get zone type from the zone identification
      * @param zone string zone identification
      * @return symbol zone type
      */
    global define symbol getZoneType (string zone) ``{
        string relevant_zone_part = "";
        if (size (zone) > 12
	    && substring (zone, size (zone) - 12) == "in-addr.arpa")
	{
	    return `reverse;
	}
	return `normal;
    }


/* EOF */
}
