Last active
December 21, 2015 14:39
-
-
Save AlainODea/6321603 to your computer and use it in GitHub Desktop.
An SMF manifest for ISC DHCP on SmartOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl https://gist.githubusercontent.com/AlainODea/6321603/raw/760ebf43a2f48a78d99b8ca6dbc98a4b84684647/isc-dhcpd-smf.xml > /opt/local/lib/svc/manifest/isc-dhcpd-smf.xml | |
svccfg import /opt/local/lib/svc/manifest/isc-dhcpd-smf.xml | |
echo Run 'svcadm enable svc:/pkgsrc/isc-dhcpd:default' to enable ISC DHCP Daemon after configuration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> | |
<service_bundle type="manifest" name="isc-dhcpd"> | |
<service name="pkgsrc/isc-dhcpd" type="service" version="1"> | |
<create_default_instance enabled="false" /> | |
<single_instance /> | |
<dependency name='network' grouping='require_all' restart_on='error' type='service'> | |
<service_fmri value='svc:/milestone/network:default' /> | |
</dependency> | |
<dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'> | |
<service_fmri value='svc:/system/filesystem/local:default' /> | |
</dependency> | |
<exec_method type="method" name="start" exec="/opt/local/sbin/dhcpd &" timeout_seconds="10"> | |
<method_context> | |
<method_credential user="root" group="root" /> | |
</method_context> | |
</exec_method> | |
<exec_method type="method" name="stop" exec=":kill" timeout_seconds="30" /> | |
<template> | |
<common_name> | |
<loctext xml:lang="C">ISC DHCP Server</loctext> | |
</common_name> | |
</template> | |
</service> | |
</service_bundle> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Care to code review a more thorough one we're doing for OmniOS? It's still a work in progress (v6 relay needs real help, and other services may need svccfg variables as well).
http://kebe.com/~danmcd/webrevs/ob-dhcpd/