Commit 6a1cbf68b7cbb6967f218a2cf65345518b49706a

Authored by ths
1 parent c4e27dd4

script=no for the TUN/TAP net option, by Jean-Christian de Rivaz


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2376 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 4 additions and 2 deletions
qemu-doc.texi
... ... @@ -358,7 +358,8 @@ hostname reported by the builtin DHCP server.
358 358 @item -net tap[,vlan=n][,fd=h][,ifname=name][,script=file]
359 359 Connect the host TAP network interface @var{name} to VLAN @var{n} and
360 360 use the network script @var{file} to configure it. The default
361   -network script is @file{/etc/qemu-ifup}. If @var{name} is not
  361 +network script is @file{/etc/qemu-ifup}. Use @option{script=no} to
  362 +disable script execution. If @var{name} is not
362 363 provided, the OS automatically provides one. @option{fd=h} can be
363 364 used to specify the handle of an already opened host TAP interface. Example:
364 365  
... ...
... ... @@ -3289,7 +3289,7 @@ static int net_tap_init(VLANState *vlan, const char *ifname1,
3289 3289 if (fd < 0)
3290 3290 return -1;
3291 3291  
3292   - if (!setup_script)
  3292 + if (!setup_script || !strcmp(setup_script, "no"))
3293 3293 setup_script = "";
3294 3294 if (setup_script[0] != '\0') {
3295 3295 /* try to launch network init script */
... ... @@ -6066,6 +6066,7 @@ void help(void)
6066 6066 "-net tap[,vlan=n][,fd=h][,ifname=name][,script=file]\n"
6067 6067 " connect the host TAP network interface to VLAN 'n' and use\n"
6068 6068 " the network script 'file' (default=%s);\n"
  6069 + " use 'script=no' to disable script execution;\n"
6069 6070 " use 'fd=h' to connect to an already opened TAP interface\n"
6070 6071 #endif
6071 6072 "-net socket[,vlan=n][,fd=h][,listen=[host]:port][,connect=host:port]\n"
... ...