Changeset 9b97c0b


Ignore:
Timestamp:
06/26/14 10:09:58 (8 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.3, releng/10.1, releng/10.1.1
Children:
33307fd, 19bab26
Parents:
aadcedc
Message:

Add support for setting the jail interface via warden set / get flags

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/warden/bin/warden

    r4e2f3dd r9b97c0b  
    7979Available options: 
    8080 
     81             iface: Lets you see the network interface for this jail 
    8182              ipv4: Lets you see the IPv4 address for this jail 
    8283              ipv6: Lets you see the IPv6 address for this jail 
     
    114115Available options: 
    115116 
     117             iface: Set the network interface for this jail 
    116118              ipv4: Set the IPv4 address for this jail 
    117119              ipv6: Set the IPv6 address for this jail 
     
    689691         case $OPT in 
    690692             flags) cat "${JMETADIR}/jail-flags" 2>/dev/null | sed 's| |,|g' ;; 
     693             iface) cat "${JMETADIR}/iface"  2>/dev/null ;; 
    691694              ipv4) cat "${JMETADIR}/ipv4"  2>/dev/null | sed 's| |,|g' ;; 
    692695              ipv6) cat "${JMETADIR}/ipv6"  2>/dev/null | sed 's| |,|g' ;; 
     
    711714 
    712715         case $OPT in 
     716          iface) IFACE="${4}" 
     717                 ifconfig $IFACE 2>/dev/null >/dev/null 
     718                 if [ $? -eq 0 ] ; then 
     719                    echo "WARNING: The interface ($IFACE) does not exist" 
     720                 fi 
     721                 echo $IFACE > "${JMETADIR}/iface" 
     722                 ;; 
    713723             ipv4) IP4="${4}" 
    714724                 get_ip_and_netmask "${IP4}" 
Note: See TracChangeset for help on using the changeset viewer.