Commit 92233909 authored by David Scott's avatar David Scott Committed by Natanael Copa

main/busybox-initscripts: add support for DHCP search domains

This also updates /etc/resolv.conf atomically to avoid transient
failures during updates.
Signed-off-by: default avatarDavid Scott <dave.scott@docker.com>
parent 5fd04a3c
......@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox-initscripts
pkgver=3.0
pkgrel=5
pkgrel=6
pkgdesc="Init scripts for busybox daemons"
url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts"
arch="noarch"
......@@ -75,7 +75,7 @@ ad1556961294e4aa2abca6be52138b7c dvbdev
daf57f3d0372f825ddc05b00973e5afe usbdev
30b0c85956b6701caf55309a17e537f6 usbdisk_link
826d85313ca7a4a0205d63bd58b7d01f xvd_links
be2620bc19f63bf6b851916df91be82b default.script"
bf044c113e04dcb7ad3206e329ae8e78 default.script"
sha256sums="c92c6f91d56de0e7ac7189a85c6bb0f054199acc2b18258f4c7e0939d352b8b0 acpid.initd
182bddd5097daf3995c4eceec38cf9ab758f271b3e65d6b0f8a67f1281c8de19 crond.initd
26b7af7288089e8462db062c0644c8a66855d6bd0eaa7edd2a3a43b3655c7da8 dnsd.initd
......@@ -100,7 +100,7 @@ ef091bb4c8943a99b9a97b556cdc15ddd20275f5afa8287e201419b08c4e71de dvbdev
dcb0c37590019bccb4c31a5372cbf7728eae6f1174d56bf0708d7504243a5fbb usbdev
4957f6991e0cb988b263b5276b582f1757deecad19cddebe3c615b381df9f858 usbdisk_link
86ed99205050a5dcca8a27c7e8658df8c55dc85ed810db0d64b51f7c63aa140e xvd_links
4b94d6c8cb0ac219419e74e9cdee1e8804cdfd3bb81eb86894c42e4872587d43 default.script"
1454249a4e603fe1c657321486e62f433e54d7360f1743e0a71355d1e4dbe0f6 default.script"
sha512sums="dd548670114a92404b8e35fb915fdbe5994498b05b0a418583271c3dd72fb7800950e42c095c902a014eb198c046b8a346d43dccd8e7a158048ae33767c572ed acpid.initd
c9d0fb0f8cc27d661d3b4e58c56eb598ca368890576e18ffffd42efdf68ba35537656be9be319b2e2818aa0152d3ca8611bece2433512fbfcd4eed7988765549 crond.initd
82c70082fa6e00c389982e16b0ef92f8f137941517a2b74de57150f4645d8b8b2a91abaa22d5aede8f7d08e0749ef14a07860cf16f96058b96f4246a6c39222a dnsd.initd
......@@ -125,4 +125,4 @@ ebd82f935da2ca89097234dd8a8f47e179a423652c151123a1f3343f3e1e7bfaba2b8800380e988d
b2dcf0ded9264334d79fbbb05dd12d649dc3119a060db5893f0e8aeca2141323961c3ba4c822a0ffb00dba848742d5cb374dc77e776b57cecde352a3e8e30f8a usbdev
392c40d223bdff59a624bd67907c06cff9c1b5468c25c19e10dbc3cef3208275d93966e760f140d71a86cb36ec796ea08dbaa767b40c12e9326c3c72964b28a8 usbdisk_link
5db6fa8bbb2d891212187c598cd8703277b3fcb95b5dba6628f7128eb48cc7c1bf4c53885e9d870999c8c95d2fe9cd27609b523596dc553c31b6f72a452a0118 xvd_links
3a25e0333a665bebfa66f90653684068d2ea11f74a208109ab0f7869f5e3c6bc9b90f41d678d91d98ccfa0fdf7d598076d33b7cd944bba1d4202a7480a6aa067 default.script"
d6f5f073a77a3b96cc7449a9fa4115829707488f379c8b3cb7f33dcaca112eedb02ff255b99c3131840cd9916d79842b01ea66592b84221c5bd417d074dc4453 default.script"
......@@ -83,11 +83,16 @@ resolvconf() {
for i in $NO_DNS; do
[ "$i" = "$interface" ] && return
done
echo -n > "$RESOLV_CONF"
[ -n "$domain" ] && echo "search $domain" >> "$RESOLV_CONF"
echo -n > "$RESOLV_CONF.$$"
if [ -n "$search" ]; then
echo "search $search" >> "$RESOLV_CONF.$$"
elif [ -n "$domain" ]; then
echo "search $domain" >> "$RESOLV_CONF.$$"
fi
for i in $dns; do
echo "nameserver $i" >> "$RESOLV_CONF"
echo "nameserver $i" >> "$RESOLV_CONF.$$"
done
mv "$RESOLV_CONF.$$" "$RESOLV_CONF"
}
bound() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment