On 二, 2005-11-15 at 15:31 +0100, hmm wrote: > hi > > > I put the next three line into /etc/qemu-ifup. > > #!/bin/sh > > echo $* >> /tmp/qemu-ifup.$$ > > sudo /sbin/ifconfig ${1##/*/} 0.0.0.0 promisc up > > sudo /usr/sbin/brctl addif bridge ${1##/*/}
> > as you did not mention /etc/sudoers i suspect you did not configure > your sudoers(5) file. I have configure my /etc/sudoers, like that: Cmnd_Alias QEMU=/sbin/ifconfig,/usr/sbin/brctl admin ALL=(ALL) ALL admin ALL=NOPASSWD:QEMU So if someone run qemu, it will use sodu to run ifconfig and brctl. my question is: when I configure no mattler like above or as bellow: #!/bin/sh echo $* >> /tmp/qemu-ifup.$$ /sbin/ifconfig ${1##/*/} 0.0.0.0 promisc up /usr/sbin/brctl addif bridge ${1##/*/} the script will run when use root. But when not use root or sudo, the script won't run. I don't know why. ( the script: "echo $* >> /tmp/qemu-ifup.$$" can tell me whether the script was run) _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel