Skip to content

Instantly share code, notes, and snippets.

@badboy
Forked from bharrisau/README
Created December 16, 2013 23:14

Revisions

  1. @bharrisau bharrisau revised this gist Aug 20, 2012. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions ipv6
    Original file line number Diff line number Diff line change
    @@ -7,5 +7,11 @@ load_sdc_sysinfo
    load_sdc_config

    ifconfig ${SYSINFO_NIC_admin} inet6 plumb up
    ifconfig ${SYSINFO_NIC_admin} inet6 addif ${CONFIG_admin_v6_ip} up
    route add -inet6 default ${CONFIG_admin_v6_gateway}

    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
  2. @bharrisau bharrisau revised this gist Aug 19, 2012. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion README
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,7 @@
    Need to open /usbkey/config and add

    admin_v6_ip=xx:xx:xx/xx
    admin_v6_gateway=yy:yy:yy
    admin_v6_gateway=yy:yy:yy

    place ipv6 in /opt/custom/smf
    place ipv6.xml in /opt/custom/scripts
  3. @bharrisau bharrisau revised this gist Aug 19, 2012. 2 changed files with 15 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions README
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    Need to open /usbkey/config and add

    admin_v6_ip=xx:xx:xx/xx
    admin_v6_gateway=yy:yy:yy
    11 changes: 11 additions & 0 deletions ipv6
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/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
    ifconfig ${SYSINFO_NIC_admin} inet6 addif ${CONFIG_admin_v6_ip} up
    route add -inet6 default ${CONFIG_admin_v6_gateway}
  4. @bharrisau bharrisau created this gist Aug 19, 2012.
    28 changes: 28 additions & 0 deletions ipv6.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,28 @@
    <?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>