resolvconf/initscripts: Change resolv.conf generation for sysvinit
PATCH 1/1 resolvconf/initscripts: Change resolv.conf generation for sysvinit
The resolv.conf link generated by initscripts causes a warning with resolvconf. The resolvconf script expects a different target.
Use the ALTERNATIVES system to create the link via populate-volatiles.sh.
--- .../resolvconf/files/volatiles_resolv-conf | 1 + .../resolvconf/resolvconf_1.75.bb | 15 ++++++++++++++- .../initscripts/initscripts-1.0/volatiles | 1 - .../initscripts-1.0/volatiles_resolv-conf | 1 + meta/recipes-core/initscripts/initscripts_1.0.bb | 9 ++++++++- 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-connectivity/resolvconf/files/volatiles_resolv-conf create mode 100644 meta/recipes-core/initscripts/initscripts-1.0/volatiles_resolv-conf
meta/recipes-connectivity/resolvconf/files/volatiles_resolv-conf new file +1 -0
@@ -0,0 +1 @@ +l root root 0644 /etc/resolv.conf /etc/resolvconf/run/resolv.conf
meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb +14 -1
@@ -11,12 +11,16 @@ AUTHOR = "Thomas Hood" HOMEPAGE = "http://packages.debian.org/resolvconf" RDEPENDS_${PN} = "bash" -SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz" +SRC_URI = "\ + ${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz \ + file://volatiles_resolv-conf \ +" SRC_URI[md5sum] = "4b8bc86a3cf070e3fd0e9aff7eaaba56" SRC_URI[sha256sum] = "16167f37a77ef4bc4596dcbefece269b6a10d10fa448594ec55ed3303193086e" inherit allarch +inherit update-alternatives do_compile () { :
@@ -30,6 +34,10 @@ do_install () { install -d ${D}${sysconfdir}/tmpfiles.d echo "d /run/${BPN}/interface - - - -" \ > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf + else + # Use a volatiles script to install resolv.conf symlink + install -d install -d ${D}${libdir}/${BPN} + install -m 0755 ${WORKDIR}/volatiles_resolv-conf ${D}${libdir}/${BPN}/resolv-conf fi install -d ${D}${sysconfdir}/${BPN} ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
@@ -42,6 +50,11 @@ do_install () { install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/ } +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN}_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'resolvconf', d)}" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/default/volatiles/00_resolv-conf" +ALTERNATIVE_TARGET[resolv-conf] = "${libdir}/${BPN}/resolv-conf" + pkg_postinst_${PN} () { if [ -z "$D" ]; then if command -v systemd-tmpfiles >/dev/null; then
meta/recipes-core/initscripts/initscripts-1.0/volatiles +0 -1
@@ -32,5 +32,4 @@ l root root 1777 /tmp /var/tmp d root root 0755 /var/lock/subsys none f root root 0664 /var/log/wtmp none f root root 0664 /var/run/utmp none -l root root 0644 /etc/resolv.conf /var/run/resolv.conf f root root 0644 /var/run/resolv.conf none
meta/recipes-core/initscripts/initscripts-1.0/volatiles_resolv-conf new file +1 -0
@@ -0,0 +1 @@ +l root root 0644 /etc/resolv.conf /var/run/resolv.conf
meta/recipes-core/initscripts/initscripts_1.0.bb +8 -1
@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic system startup initialization scrip SECTION = "base" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" -PR = "r155" +PR = "r156" INHIBIT_DEFAULT_DEPS = "1"
@@ -29,6 +29,7 @@ SRC_URI = "file://functions \ file://populate-volatile.sh \ file://read-only-rootfs-hook.sh \ file://volatiles \ + file://volatiles_resolv-conf \ file://save-rtc.sh \ file://GPLv2.patch \ file://dmesg.sh \
@@ -45,8 +46,14 @@ DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-sys PACKAGES =+ "${PN}-functions" RDEPENDS_${PN} = "${PN}-functions" +FILES_${PN} += "${libdir}/${BPN}/" FILES_${PN}-functions = "${sysconfdir}/init.d/functions*" +ALTERNATIVE_PRIORITY_${PN} = "90" +ALTERNATIVE_${PN} = "resolv-conf" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${sysconfdir}/default/volatiles/00_resolv-conf" +ALTERNATIVE_TARGET[resolv-conf] = "${libdir}/${BPN}/resolv-conf" + ALTERNATIVE_PRIORITY_${PN}-functions = "90" ALTERNATIVE_${PN}-functions = "functions" ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions"
Signature · 1 line
1.7.9.5
Patch ping follow up
Quoted 141 lines · Jate Sujjavanich
The resolv.conf link generated by initscripts causes a warning with resolvconf. The resolvconf script expects a different target.
Use the ALTERNATIVES system to create the link via
populate-volatiles.sh.Signed-off-by Jate Sujjavanich <[email protected]>--- .../resolvconf/files/volatiles_resolv-conf | 1 + .../resolvconf/resolvconf_1.75.bb | 15 ++++++++++++++- .../initscripts/initscripts-1.0/volatiles | 1 - .../initscripts-1.0/volatiles_resolv-conf | 1 + meta/recipes-core/initscripts/initscripts_1.0.bb | 9 ++++++++- 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-connectivity/resolvconf/files/volatiles_resolv-conf create mode 100644meta/recipes-core/initscripts/initscripts-1.0/volatiles_resolv-conf
diff --git a/meta/recipes-connectivity/resolvconf/files/volatiles_resolv-conf b/meta/recipes-connectivity/resolvconf/files/volatiles_resolv-conf new file mode 100644
index 0000000..e58993dmeta/recipes-connectivity/resolvconf/files/volatiles_resolv-conf new file +1
-0@@ -0,0 +1 @@ +l root root 0644 /etc/resolv.conf /etc/resolvconf/run/resolv.confmeta/recipes-connectivity/resolvconf/resolvconf_1.75.bb +4
-1@@ -11,12 +11,16 @@ AUTHOR = "Thomas Hood" HOMEPAGE = "http://packages.debian.org/resolvconf" RDEPENDS_${PN} = "bash" -SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz" +SRC_URI = "\ + ${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz \ + file://volatiles_resolv-conf \ +" SRC_URI[md5sum] = "4b8bc86a3cf070e3fd0e9aff7eaaba56" SRC_URI[sha256sum] ="
16167f37a77ef4bc4596dcbefece269b6a10d10fa448594ec55ed3303193086e"inherit allarch
meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb +5
-0+inherit update-alternatives do_compile () { :@@ -30,6 +34,10 @@ do_install () { install -d ${D}${sysconfdir}/tmpfiles.d echo "d /run/${BPN}/interface - - - -" \ > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf + else + # Use a volatiles script to install resolv.conf symlink + install -d install -d ${D}${libdir}/${BPN} + install -m 0755 ${WORKDIR}/volatiles_resolv-conf${D}${libdir}/${BPN}/resolv-conf
fi install -d ${D}${sysconfdir}/${BPN} ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/runmeta/recipes-connectivity/resolvconf/resolvconf_1.75.bb +2
-0@@ -42,6 +50,11 @@ do_install () { install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/ } +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN}_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd', '', 'resolvconf', d)}"
+ALTERNATIVE_LINK_NAME[resolv-conf] =
"${sysconfdir}/default/volatiles/00_resolv-conf"meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb +2
-0+ALTERNATIVE_TARGET[resolv-conf] = "${libdir}/${BPN}/resolv-conf" + pkg_postinst_${PN} () { if [ -z "$D" ]; then if command -v systemd-tmpfiles >/dev/null; thenmeta/recipes-core/initscripts/initscripts-1.0/volatiles +0
-1@@ -32,5 +32,4 @@ l root root 1777 /tmp /var/tmp d root root 0755 /var/lock/subsys none f root root 0664 /var/log/wtmp none f root root 0664 /var/run/utmp none -l root root 0644 /etc/resolv.conf /var/run/resolv.conf f root root 0644 /var/run/resolv.conf nonediff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles_resolv-conf b/meta/recipes-core/initscripts/initscripts-1.0/volatiles_resolv-conf new file mode 100644
index 0000000..ce7122dmeta/recipes-core/initscripts/initscripts-1.0/volatiles_resolv-conf new file +1
-0@@ -0,0 +1 @@ +l root root 0644 /etc/resolv.conf /var/run/resolv.confmeta/recipes-core/initscripts/initscripts_1.0.bb +0
-0@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic systemstartup initialization scrip
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"meta/recipes-core/initscripts/initscripts_1.0.bb +2
-1-PR = "r155" +PR = "r156" INHIBIT_DEFAULT_DEPS = "1"@@ -29,6 +29,7 @@ SRC_URI = "file://functions \ file://populate-volatile.sh \ file://read-only-rootfs-hook.sh \ file://volatiles \ + file://volatiles_resolv-conf \ file://save-rtc.sh \ file://GPLv2.patch \ file://dmesg.sh \@@ -45,8 +46,14 @@ DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-sys
PACKAGES =+ "${PN}-functions"
RDEPENDS_${PN} = "${PN}-functions"meta/recipes-core/initscripts/initscripts_1.0.bb +4
-0+FILES_${PN} += "${libdir}/${BPN}/" FILES_${PN}-functions = "${sysconfdir}/init.d/functions*" +ALTERNATIVE_PRIORITY_${PN} = "90" +ALTERNATIVE_${PN} = "resolv-conf" +ALTERNATIVE_LINK_NAME[resolv-conf] ="${sysconfdir}/default/volatiles/00_resolv-conf"
meta/recipes-core/initscripts/initscripts_1.0.bb +2
-1+ALTERNATIVE_TARGET[resolv-conf] = "${libdir}/${BPN}/resolv-conf" + ALTERNATIVE_PRIORITY_${PN}-functions = "90" ALTERNATIVE_${PN}-functions = "functions" ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions" --1.7.9.5
Anybody using resolvconf?
Ping
Quoted 150 lines · Jate Sujjavanich
Patch ping follow up
Quoted 142 lines · Jate Sujjavanich
The resolv.conf link generated by initscripts causes a warning with resolvconf. The resolvconf script expects a different target.
Use the ALTERNATIVES system to create the link via
populate-volatiles.sh.Signed-off-by Jate Sujjavanich <[email protected]>--- .../resolvconf/files/volatiles_resolv-conf | 1 + .../resolvconf/resolvconf_1.75.bb | 15 ++++++++++++++- .../initscripts/initscripts-1.0/volatiles | 1 - .../initscripts-1.0/volatiles_resolv-conf | 1 + meta/recipes-core/initscripts/initscripts_1.0.bb | 9 ++++++++- 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-connectivity/resolvconf/files/volatiles_resolv-conf create mode 100644meta/recipes-core/initscripts/initscripts-1.0/volatiles_resolv-conf
diff --git a/meta/recipes-connectivity/resolvconf/files/volatiles_resolv-conf b/meta/recipes-connectivity/resolvconf/files/volatiles_resolv-conf new file mode 100644
index 0000000..e58993dmeta/recipes-connectivity/resolvconf/files/volatiles_resolv-conf new file +1
-0@@ -0,0 +1 @@ +l root root 0644 /etc/resolv.conf /etc/resolvconf/run/resolv.confmeta/recipes-connectivity/resolvconf/resolvconf_1.75.bb +4
-1@@ -11,12 +11,16 @@ AUTHOR = "Thomas Hood" HOMEPAGE = "http://packages.debian.org/resolvconf" RDEPENDS_${PN} = "bash" -SRC_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz" +SRC_URI = "\ + ${DEBIAN_MIRROR}/main/r/resolvconf/resolvconf_${PV}.tar.xz \ + file://volatiles_resolv-conf \ +" SRC_URI[md5sum] = "4b8bc86a3cf070e3fd0e9aff7eaaba56" SRC_URI[sha256sum] ="
16167f37a77ef4bc4596dcbefece269b6a10d10fa448594ec55ed3303193086e"inherit allarch
meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb +5
-0+inherit update-alternatives do_compile () { :@@ -30,6 +34,10 @@ do_install () { install -d ${D}${sysconfdir}/tmpfiles.d echo "d /run/${BPN}/interface - - - -" \ > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf + else + # Use a volatiles script to install resolv.conf symlink + install -d install -d ${D}${libdir}/${BPN} + install -m 0755 ${WORKDIR}/volatiles_resolv-conf${D}${libdir}/${BPN}/resolv-conf
fi install -d ${D}${sysconfdir}/${BPN} ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/runmeta/recipes-connectivity/resolvconf/resolvconf_1.75.bb +2
-0@@ -42,6 +50,11 @@ do_install () { install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/ } +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN}_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd', '', 'resolvconf', d)}"
+ALTERNATIVE_LINK_NAME[resolv-conf] =
"${sysconfdir}/default/volatiles/00_resolv-conf"meta/recipes-connectivity/resolvconf/resolvconf_1.75.bb +2
-0+ALTERNATIVE_TARGET[resolv-conf] = "${libdir}/${BPN}/resolv-conf" + pkg_postinst_${PN} () { if [ -z "$D" ]; then if command -v systemd-tmpfiles >/dev/null; thenmeta/recipes-core/initscripts/initscripts-1.0/volatiles +0
-1@@ -32,5 +32,4 @@ l root root 1777 /tmp /var/tmp d root root 0755 /var/lock/subsys none f root root 0664 /var/log/wtmp none f root root 0664 /var/run/utmp none -l root root 0644 /etc/resolv.conf /var/run/resolv.conf f root root 0644 /var/run/resolv.conf nonediff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles_resolv-conf b/meta/recipes-core/initscripts/initscripts-1.0/volatiles_resolv-conf new file mode 100644
index 0000000..ce7122dmeta/recipes-core/initscripts/initscripts-1.0/volatiles_resolv-conf new file +1
-0@@ -0,0 +1 @@ +l root root 0644 /etc/resolv.conf /var/run/resolv.confmeta/recipes-core/initscripts/initscripts_1.0.bb +0
-0@@ -3,7 +3,7 @@ DESCRIPTION = "Initscripts provide the basic systemstartup initialization scrip
SECTION = "base"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM= "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"meta/recipes-core/initscripts/initscripts_1.0.bb +2
-1-PR = "r155" +PR = "r156" INHIBIT_DEFAULT_DEPS = "1"@@ -29,6 +29,7 @@ SRC_URI = "file://functions \ file://populate-volatile.sh \ file://read-only-rootfs-hook.sh \ file://volatiles \ + file://volatiles_resolv-conf \ file://save-rtc.sh \ file://GPLv2.patch \ file://dmesg.sh \@@ -45,8 +46,14 @@ DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-sys
PACKAGES =+ "${PN}-functions"
RDEPENDS_${PN} = "${PN}-functions"meta/recipes-core/initscripts/initscripts_1.0.bb +4
-0+FILES_${PN} += "${libdir}/${BPN}/" FILES_${PN}-functions = "${sysconfdir}/init.d/functions*" +ALTERNATIVE_PRIORITY_${PN} = "90" +ALTERNATIVE_${PN} = "resolv-conf" +ALTERNATIVE_LINK_NAME[resolv-conf] ="${sysconfdir}/default/volatiles/00_resolv-conf"
meta/recipes-core/initscripts/initscripts_1.0.bb +2
-1+ALTERNATIVE_TARGET[resolv-conf] = "${libdir}/${BPN}/resolv-conf" + ALTERNATIVE_PRIORITY_${PN}-functions = "90" ALTERNATIVE_${PN}-functions = "functions" ALTERNATIVE_LINK_NAME[functions] = "${sysconfdir}/init.d/functions" --1.7.9.5