Skip to content

Instantly share code, notes, and snippets.

@badboy
Forked from bharrisau/README
Created December 16, 2013 23:14
Show Gist options
  • Save badboy/7996519 to your computer and use it in GitHub Desktop.
Save badboy/7996519 to your computer and use it in GitHub Desktop.
Need to open /usbkey/config and add
admin_v6_ip=xx:xx:xx/xx
admin_v6_gateway=yy:yy:yy
place ipv6 in /opt/custom/smf
place ipv6.xml in /opt/custom/scripts
#!/bin/bash
. /lib/svc/share/smf_include.sh
. /lib/sdc/config.sh
load_sdc_sysinfo
load_sdc_config
ifconfig ${SYSINFO_NIC_admin} inet6 plumb up
if [[ -n "${CONFIG_admin_v6_ip}" ]] && [[ -n "${CONFIG_admin_v6_gateway}" ]]; then
ifconfig ${SYSINFO_NIC_admin} inet6 addif ${CONFIG_admin_v6_ip} up
route add -inet6 ${CONFIG_admin_v6_gateway} ${CONFIG_admin_v6_ip} -interface
route add -inet6 default ${CONFIG_admin_v6_gateway}
fi
exit $SMF_EXIT_OK
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="export">
<service name="site/ipv6" type="service" version="0">
<create_default_instance enabled="true"/>
<single_instance/>
<dependency name="network" grouping="require_all" restart_on="error" type="service">
<service_fmri value="svc:/milestone/network:default"/>
</dependency>
<dependency name="filesystem" grouping="require_all" restart_on="error" type="service">
<service_fmri value="svc:/system/filesystem/local"/>
</dependency>
<method_context/>
<exec_method name="start" type="method" exec="/opt/custom/scripts/ipv6" timeout_seconds="60"/>
<exec_method name="stop" type="method" exec=":kill" timeout_seconds="60"/>
<property_group name="startd" type="framework">
<propval name="duration" type="astring" value="transient"/>
<propval name="ignore_error" type="astring" value="core,signal"/>
</property_group>
<property_group name="application" type="application"/>
<stability value="Evolving"/>
<template>
<common_name>
<loctext xml:lang="C">Create an IPv6 vnic, bind to admin and bring up for global zone</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