Skip to contentSkip to conversation

Revert "ifupdown: create file interfaces if not exist"

PATCH In review Chen Qi 2 participants 2 messages Mar 30, 2020

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

PATCH 1/1 Revert "ifupdown: create file interfaces if not exist"

This reverts commit 4e692daf66d2c9d51d418706e20f4527505dc0bd.

The patch did not take into consideration of read-only rootfs, causing the following regression.

ERROR "The following packages could not be configured offline and rootfs is read-only: ['100-ifupdown']"

The original patch was added to resolve problem running `ifup eth1' on a systemd based rootfs. However, when using systemd, we do not use ifup to manage our network interfaces.

---
 meta/recipes-core/ifupdown/ifupdown_0.8.35.bb | 7 -------
 1 file changed, 7 deletions(-)
meta/recipes-core/ifupdown/ifupdown_0.8.35.bb +0 -7
index a8913e6e29..53cb971d33 100644
@@ -48,13 +48,6 @@ do_install_ptest () {
     cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/
 }
 
-pkg_postinst_ontarget_${PN} () {
-    if [ ! -f /etc/network/interfaces ]; then
-        mkdir -p /etc/network
-        touch /etc/network/interfaces
-    fi
-}
-
 ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE_${PN} = "ifup ifdown"
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 23 lines · Chen Qi

This reverts commit 4e692daf66d2c9d51d418706e20f4527505dc0bd.

The patch did not take into consideration of read-only rootfs, causing the following regression.

ERROR "The following packages could not be configured offline and rootfs is read-only: ['100-ifupdown']"

The original patch was added to resolve problem running `ifup eth1' on a systemd based rootfs. However, when using systemd, we do not use ifup to manage our network interfaces.

---
  meta/recipes-core/ifupdown/ifupdown_0.8.35.bb | 7 -------
  1 file changed, 7 deletions(-)
meta/recipes-core/ifupdown/ifupdown_0.8.35.bb +0 -0
index a8913e6e29..53cb971d33 100644
@@ -48,13 +48,6 @@ do_install_ptest () {
      cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/
  }

meta/recipes-core/ifupdown/ifupdown_0.8.35.bb do_install_ptest () { · line 52

Quoted 10 lines
meta/recipes-core/ifupdown/ifupdown_0.8.35.bb +0 -7
 
-pkg_postinst_ontarget_${PN} () {
-    if [ ! -f /etc/network/interfaces ]; then
-        mkdir -p /etc/network
-        touch /etc/network/interfaces
-    fi
-}
-
  ALTERNATIVE_PRIORITY = "100"
  ALTERNATIVE_${PN} = "ifup ifdown"

The network configure files used by ifupdown are provided by init-ifupdown by default. I once thought to make  ifupdown depends on it. But init-ifupdown provides a script to configure network and then will need 'inherit systemd'. I once thought it is not proper to make a sysvinit related package to inherit systemd. But if the original patch causes readonly rootfs issue,  I'll turn to work with init-ifupdown.

Sorry for the inconvenience.

Kai

Quoted 3 lines
Signature · 2 lines
Kai Kang
Wind River Linux