Changeset 4d44750


Ignore:
Timestamp:
07/07/14 12:52:41 (10 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
19bab26
Parents:
9b4817eb
Message:

Prevent foot-shooting on bulk jail creation if you forgot to specify
a IP address to start the pool with

File:
1 edited

Legend:

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

    r37e71e4f r4d44750  
    995995         JAILNAME="$2" 
    996996         if [ -z "${JAILNAME}" ]; then exit_err "No jail specified!"; fi 
     997         echo "$2" | grep -q '^-' 
     998         if [ $? -eq 0 ] ; then 
     999            exit_err "Jailname must be specified first before -- flags!" 
     1000         fi 
    9971001 
    9981002 
     
    11011105           # Set the IP pool to use 
    11021106           if [ -z "$IP4POOL" ] ; then IP4POOL="$DEFAULT_IP4POOL"; fi 
     1107           if [ -z "$IP4POOL" ] ; then 
     1108              exit_err "No IPv4 pool specified! Use --ipv4pool or setup IP4POOL: in warden.conf" 
     1109           fi 
    11031110           curNum="`echo $IP4POOL | cut -d '.' -f 4`" 
    11041111           baseIP="`echo $IP4POOL | cut -d '.' -f 1-3`" 
Note: See TracChangeset for help on using the changeset viewer.