{
echo \
$"Usage: $1 [--silent] [--nid <nid>] [--ip <ip_num>[/<mask>]]
- [--bcast <broadcast>] [--] <commands> <args>*
+ [--lback <loopback>] [--bcast <broadcast>]
+ [--] <commands> <args>*
--silent
Do not print the addresses assigned.
Network context id to use.
--ip <ip_num>[/<mask>]
IP address to bind to.
+--lback <loopback>
+ Loopback address for the network context.
--bcast <broadcast>
Broadcast address for the network context.
exit $1
}
-$_VSERVER_INFO - FEATURE vnet || exec $_CHBIND_COMPAT "$@"
-
-tmp=$(getopt -o + --long ncap:,nid:,ip:,bcast:,disconnect,flag:,secure,silent,help,version -n "$0" -- "$@") || exit 1
+tmp=$(getopt -o + --long ncap:,nid:,ip:,bcast:,lback:,disconnect,flag:,secure,silent,help,version -n "$0" -- "$@") || exit 1
eval set -- "$tmp"
OPT_CAPS=()
OPT_SECURE=
OPT_SILENT=
OPT_BCAST=
+OPT_LBACK=
OPT_IPS=()
while true; do
--flag) OPT_FLAGS=( "${OPT_FLAGS[@]}" "$2" ); shift;;
--secure) OPT_SECURE=1;;
--silent) OPT_SILENT=1;;
- --ip) OPT_IPS=( "${OPT_IPS[@]}" "$2" ); shift;;
+ --ip) OPT_IPS=( "${OPT_IPS[@]}" --ip "$2" ); shift;;
--bcast) OPT_BCAST=$2; shift;;
+ --lback) OPT_LBACK=$2; shift;;
--) shift; break;;
*) echo $"chbind: internal error; arg=='$1'" >&2; exit 1;;
esac
shift
done
+$_VSERVER_INFO - FEATURE vnet || exec $_CHBIND_COMPAT \
+ ${OPT_NID:+--nid "$OPT_NID"} \
+ ${OPT_SILENT:+--silent} \
+ ${OPT_BCAST:+--bcast "$OPT_BCAST"} \
+ "${OPT_IPS[@]}" \
+ -- "$@"
+
create_cmd=( $_NCONTEXT --create --silentexist
${OPT_SILENT:+--silent}
${OPT_NID:+--nid "$OPT_NID"} )
--
$_NADDRESS --add
${OPT_SILENT:+--silent}
- ${OPT_BCAST:+--bcast "$OPT_BCAST"} )
+ ${OPT_BCAST:+--bcast "$OPT_BCAST"}
+ ${OPT_LBACK:+--lback "$OPT_LBACK"}
+ "${OPT_IPS[@]}" )
-for ip in "${OPT_IPS[@]}"; do
- chain_cmd=( "${chain_cmd[@]}" --ip "$ip" )
-done
-
migrate_cmd=( $_NCONTEXT
${OPT_SILENT:+--silent}
${OPT_DISCONNECT:+--disconnect} )