diff options
author | Jacob Wen <jian.w.wen@oracle.com> | 2019-08-06 11:48:30 +0800 |
---|---|---|
committer | Jacob Wen <jian.w.wen@oracle.com> | 2019-08-06 12:01:59 +0800 |
commit | caff2f712897d7e1c4f199891e92115086c559cb (patch) | |
tree | 92e1064fb4aea7eb9891cc6b6bccc23f5367a2b0 | |
parent | 538f1e756139a6b57a4780e7ceb3ac6bcaa4fe6f (diff) | |
download | virtme-caff2f712897d7e1c4f199891e92115086c559cb.tar.gz |
Using udhcpc default retries
I've re-used the bridge of libvirtd. A vm gets it lease by the 3rd dhcp requests.
Log of udhcpc without this patch.
udhcpc: sending discover
udhcpc: no lease, failing
Log of udhcpc with this patch.
udhcpc: started, v1.27.2
udhcpc: sending discover
udhcpc: sending discover
udhcpc: sending select for 192.168.123.76
udhcpc: lease of 192.168.123.76 obtained, lease time 3600
This patch removes the '-t' arg to use the default retries which is 3.
Signed-off-by: Jian Wen <wenjianhn@gmail.com>
-rwxr-xr-x | virtme/guest/virtme-init | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/virtme/guest/virtme-init b/virtme/guest/virtme-init index 91201b5..86d4052 100755 --- a/virtme/guest/virtme-init +++ b/virtme/guest/virtme-init @@ -164,7 +164,7 @@ if cat /proc/cmdline |grep -q -E '(^| )virtme.dhcp($| )'; then # udev is liable to rename the interface out from under us. virtme_net=`ls "$(ls -d /sys/bus/virtio/drivers/virtio_net/virtio* |sort -g |head -n1)"/net` - busybox udhcpc -i "$virtme_net" -t 1 -n -q -f -s "$(dirname $0)/virtme-udhcpc-script" + busybox udhcpc -i "$virtme_net" -n -q -f -s "$(dirname $0)/virtme-udhcpc-script" fi if [[ -x /run/virtme/data/script ]]; then |