Commit Graph

11 Commits

Author SHA1 Message Date
Jiří Prchal
47839ae679 examples/udhcp/simple.script: add possibility to use modern "ip"
Script uses "ifconfig" only, not up-to-date so much.
This patch adds "ip" in condition if exists.

Signed-off-by: Jiří Prchal <jiri.prchal@aksignal.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-10-30 12:05:03 +01:00
Denys Vlasenko
9c192e7f94 examples: make udhcpc script handle /32 netmasks
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-06 00:53:43 +02:00
Mike Frysinger
bca5c556c4 udhcpc: use readlink rather than realpath
The realpath utility requires all paths exist when canonicalizing
symlinks.  If /etc/resolv.conf points to a tmpfs, then it might
not exist initially.  Use `readlink -f` so that we follow all
symlinks that are available.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-12 10:48:09 -04:00
Mike Frysinger
9fed24c031 udhcpc: tweak math shell style with the metric var
Some shells (like dash) are lame and omit the POSIX increment/decrement
feature (because it is listed as optional).  Tweak the shell script to
work in all POSIX variants.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-27 01:05:34 -05:00
Mike Frysinger
39b8fb41c5 udhcpc: support resolv.conf symlinks
Often it is desirable to have /etc/ be on read-only storage (well, the
whole rootfs) but have things like /etc/resolv.conf be symlinks to a
writable location.  Tweak the simple script to support that.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-27 01:01:43 -05:00
Denys Vlasenko
7cc5a50465 chmod 755 some files in examples/*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-23 21:30:30 +02:00
Denys Vlasenko
c8ab67cad8 tftp: do not risk invoking Sorcerer's Apprentice syndrome
examples/udhcp/simple.script: fix incorrect test for $1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-10 23:27:43 +02:00
Denis Vlasenko
1b47bbdfa4 tweak example udhcp script 2009-04-21 00:17:00 +00:00
Denis Vlasenko
ea4f0847c3 update example udhcpc script 2009-04-16 20:04:09 +00:00
Eric Andersen
1aee3ff8bb Simon Poole writes:
Erik,

Attached is a patch for the udhcpc sample scripts, to correct the order in
which routers are applied if the DHCP server provides more than one (as per
section 3.5 of RFC2132).

Apologies for not being on the mailing list and thanks for your continued
efforts.

Simon.
2004-10-13 07:18:05 +00:00
Russ Dill
61fb48930f added full udhcp integration 2002-10-14 21:41:28 +00:00