From: Martin Lucina Date: Fri, 14 Nov 2014 16:54:56 +0000 (+0100) Subject: rumprun: Change delimiter for BLKSPEC and NETSPEC to comma X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=aaccfae093d46ca6e2e24f4b2068bec14f717ba7;p=rumpuser-xen.git rumprun: Change delimiter for BLKSPEC and NETSPEC to comma Will work much better for IPv6 and/or NFS. Signed-off-by: Martin Lucina --- diff --git a/app-tools/rumprun b/app-tools/rumprun index 8ff0625..980ad5e 100755 --- a/app-tools/rumprun +++ b/app-tools/rumprun @@ -41,10 +41,10 @@ usage: rumprun STACK [ -ipd ] [ -N NAME ] [ -M MEM ] [ -b BLKSPEC ] [ -n NETSPEC args will be passed to the application command line -N NAME sets the domain's name to NAME, default is rumprun-APP -M MEM sets the domain's memory to MEM, default is 16 - -b BLKSPEC configures a block device as hostpath:mountpoint + -b BLKSPEC configures a block device as hostpath,mountpoint -n NETSPEC configures a network interface, using one of: - inet:dhcp - IPv4 with DHCP - inet:static:ADDR/MASK[:GATEWAY] - IPv4 with static IP + inet,dhcp - IPv4 with DHCP + inet,static,ADDR/MASK[,GATEWAY] - IPv4 with static IP -i attaches to domain console on startup -p creates the domain but leaves it paused -d destroys the domain on poweroff @@ -82,10 +82,10 @@ cidr2mask() } parse_netspec() { - # Call ourselves recursively to split $@ on : - if [ "$IFS" != ":" ]; then + # Call ourselves recursively to split $@ on , + if [ "$IFS" != "," ]; then OLDIFS=$IFS - IFS=: parse_netspec "$@" + IFS=, parse_netspec "$@" return $? else set -- $1 @@ -137,15 +137,15 @@ run_xen() { opt_name= while getopts "n:b:pidN:M:" opt; do case "$opt" in - # -n: NETSPEC: type:method + # -n: NETSPEC n) parse_netspec "${OPTARG}" || usage nindex=$(expr $nindex + 1) ;; - # -b: BLKSPEC: hostpath:mountpoint + # -b: BLKSPEC: hostpath,mountpoint b) - image=${OPTARG%:*} - mountpoint=${OPTARG#*:} + image=${OPTARG%,*} + mountpoint=${OPTARG#*,} [ -n "$image" ] || usage [ -n "$mountpoint" ] || usage [ -f "$image" ] || err File $image does not exist